@weavelogic/knowledge-graph-agent 0.2.0 → 0.3.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/README.md +686 -304
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/additionalItems.js +5 -0
- package/dist/_virtual/additionalItems.js.map +1 -0
- package/dist/_virtual/additionalProperties.js +5 -0
- package/dist/_virtual/additionalProperties.js.map +1 -0
- package/dist/_virtual/ajv.js +6 -0
- package/dist/_virtual/ajv.js.map +1 -0
- package/dist/_virtual/ajv2.js +5 -0
- package/dist/_virtual/ajv2.js.map +1 -0
- package/dist/_virtual/allOf.js +5 -0
- package/dist/_virtual/allOf.js.map +1 -0
- package/dist/_virtual/anyOf.js +5 -0
- package/dist/_virtual/anyOf.js.map +1 -0
- package/dist/_virtual/applicability.js +5 -0
- package/dist/_virtual/applicability.js.map +1 -0
- package/dist/_virtual/boolSchema.js +5 -0
- package/dist/_virtual/boolSchema.js.map +1 -0
- package/dist/_virtual/code.js +5 -0
- package/dist/_virtual/code.js.map +1 -0
- package/dist/_virtual/code2.js +5 -0
- package/dist/_virtual/code2.js.map +1 -0
- package/dist/_virtual/const.js +5 -0
- package/dist/_virtual/const.js.map +1 -0
- package/dist/_virtual/contains.js +5 -0
- package/dist/_virtual/contains.js.map +1 -0
- package/dist/_virtual/core.js +5 -0
- package/dist/_virtual/core.js.map +1 -0
- package/dist/_virtual/dataType.js +5 -0
- package/dist/_virtual/dataType.js.map +1 -0
- package/dist/_virtual/defaults.js +5 -0
- package/dist/_virtual/defaults.js.map +1 -0
- package/dist/_virtual/dependencies.js +5 -0
- package/dist/_virtual/dependencies.js.map +1 -0
- package/dist/_virtual/draft7.js +5 -0
- package/dist/_virtual/draft7.js.map +1 -0
- package/dist/_virtual/enum.js +5 -0
- package/dist/_virtual/enum.js.map +1 -0
- package/dist/_virtual/equal.js +5 -0
- package/dist/_virtual/equal.js.map +1 -0
- package/dist/_virtual/errors.js +5 -0
- package/dist/_virtual/errors.js.map +1 -0
- package/dist/_virtual/format.js +5 -0
- package/dist/_virtual/format.js.map +1 -0
- package/dist/_virtual/formats.js +5 -0
- package/dist/_virtual/formats.js.map +1 -0
- package/dist/_virtual/id.js +5 -0
- package/dist/_virtual/id.js.map +1 -0
- package/dist/_virtual/if.js +5 -0
- package/dist/_virtual/if.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index12.js +5 -0
- package/dist/_virtual/index12.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/items.js +5 -0
- package/dist/_virtual/items.js.map +1 -0
- package/dist/_virtual/items2020.js +5 -0
- package/dist/_virtual/items2020.js.map +1 -0
- package/dist/_virtual/keyword.js +5 -0
- package/dist/_virtual/keyword.js.map +1 -0
- package/dist/_virtual/limit.js +5 -0
- package/dist/_virtual/limit.js.map +1 -0
- package/dist/_virtual/limitItems.js +5 -0
- package/dist/_virtual/limitItems.js.map +1 -0
- package/dist/_virtual/limitLength.js +5 -0
- package/dist/_virtual/limitLength.js.map +1 -0
- package/dist/_virtual/limitNumber.js +5 -0
- package/dist/_virtual/limitNumber.js.map +1 -0
- package/dist/_virtual/limitProperties.js +5 -0
- package/dist/_virtual/limitProperties.js.map +1 -0
- package/dist/_virtual/metadata.js +5 -0
- package/dist/_virtual/metadata.js.map +1 -0
- package/dist/_virtual/multipleOf.js +5 -0
- package/dist/_virtual/multipleOf.js.map +1 -0
- package/dist/_virtual/names.js +5 -0
- package/dist/_virtual/names.js.map +1 -0
- package/dist/_virtual/not.js +5 -0
- package/dist/_virtual/not.js.map +1 -0
- package/dist/_virtual/oneOf.js +5 -0
- package/dist/_virtual/oneOf.js.map +1 -0
- package/dist/_virtual/pattern.js +5 -0
- package/dist/_virtual/pattern.js.map +1 -0
- package/dist/_virtual/patternProperties.js +5 -0
- package/dist/_virtual/patternProperties.js.map +1 -0
- package/dist/_virtual/prefixItems.js +5 -0
- package/dist/_virtual/prefixItems.js.map +1 -0
- package/dist/_virtual/properties.js +5 -0
- package/dist/_virtual/properties.js.map +1 -0
- package/dist/_virtual/propertyNames.js +5 -0
- package/dist/_virtual/propertyNames.js.map +1 -0
- package/dist/_virtual/ref.js +5 -0
- package/dist/_virtual/ref.js.map +1 -0
- package/dist/_virtual/ref_error.js +5 -0
- package/dist/_virtual/ref_error.js.map +1 -0
- package/dist/_virtual/required.js +5 -0
- package/dist/_virtual/required.js.map +1 -0
- package/dist/_virtual/resolve.js +5 -0
- package/dist/_virtual/resolve.js.map +1 -0
- package/dist/_virtual/rules.js +5 -0
- package/dist/_virtual/rules.js.map +1 -0
- package/dist/_virtual/scope.js +5 -0
- package/dist/_virtual/scope.js.map +1 -0
- package/dist/_virtual/subschema.js +5 -0
- package/dist/_virtual/subschema.js.map +1 -0
- package/dist/_virtual/thenElse.js +5 -0
- package/dist/_virtual/thenElse.js.map +1 -0
- package/dist/_virtual/types.js +5 -0
- package/dist/_virtual/types.js.map +1 -0
- package/dist/_virtual/ucs2length.js +5 -0
- package/dist/_virtual/ucs2length.js.map +1 -0
- package/dist/_virtual/uniqueItems.js +5 -0
- package/dist/_virtual/uniqueItems.js.map +1 -0
- package/dist/_virtual/uri.js +5 -0
- package/dist/_virtual/uri.js.map +1 -0
- package/dist/_virtual/util.js +5 -0
- package/dist/_virtual/util.js.map +1 -0
- package/dist/_virtual/validation_error.js +5 -0
- package/dist/_virtual/validation_error.js.map +1 -0
- package/dist/agents/analyst-agent.d.ts +230 -0
- package/dist/agents/analyst-agent.d.ts.map +1 -0
- package/dist/agents/analyst-agent.js +793 -0
- package/dist/agents/analyst-agent.js.map +1 -0
- package/dist/agents/architect-agent.d.ts +248 -0
- package/dist/agents/architect-agent.d.ts.map +1 -0
- package/dist/agents/architect-agent.js +685 -0
- package/dist/agents/architect-agent.js.map +1 -0
- package/dist/agents/base-agent.d.ts +169 -0
- package/dist/agents/base-agent.d.ts.map +1 -0
- package/dist/agents/base-agent.js +441 -0
- package/dist/agents/base-agent.js.map +1 -0
- package/dist/agents/coder-agent.d.ts +191 -0
- package/dist/agents/coder-agent.d.ts.map +1 -0
- package/dist/agents/coder-agent.js +1008 -0
- package/dist/agents/coder-agent.js.map +1 -0
- package/dist/agents/index.d.ts +18 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +40 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.d.ts +213 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/registry.js +419 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/researcher-agent.d.ts +226 -0
- package/dist/agents/researcher-agent.d.ts.map +1 -0
- package/dist/agents/researcher-agent.js +572 -0
- package/dist/agents/researcher-agent.js.map +1 -0
- package/dist/agents/rules-engine.d.ts +320 -0
- package/dist/agents/rules-engine.d.ts.map +1 -0
- package/dist/agents/rules-engine.js +552 -0
- package/dist/agents/rules-engine.js.map +1 -0
- package/dist/agents/tester-agent.d.ts +219 -0
- package/dist/agents/tester-agent.d.ts.map +1 -0
- package/dist/agents/tester-agent.js +683 -0
- package/dist/agents/tester-agent.js.map +1 -0
- package/dist/agents/types.d.ts +425 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +57 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/caching/index.d.ts +55 -0
- package/dist/caching/index.d.ts.map +1 -0
- package/dist/caching/index.js +206 -0
- package/dist/caching/index.js.map +1 -0
- package/dist/caching/lru-cache.d.ts +254 -0
- package/dist/caching/lru-cache.d.ts.map +1 -0
- package/dist/caching/types.d.ts +95 -0
- package/dist/caching/types.d.ts.map +1 -0
- package/dist/chunking/chunker.d.ts +94 -0
- package/dist/chunking/chunker.d.ts.map +1 -0
- package/dist/chunking/index.d.ts +125 -0
- package/dist/chunking/index.d.ts.map +1 -0
- package/dist/chunking/index.js +283 -0
- package/dist/chunking/index.js.map +1 -0
- package/dist/chunking/types.d.ts +92 -0
- package/dist/chunking/types.d.ts.map +1 -0
- package/dist/cli/commands/commit.d.ts +11 -0
- package/dist/cli/commands/commit.d.ts.map +1 -0
- package/dist/cli/commands/commit.js +379 -0
- package/dist/cli/commands/commit.js.map +1 -0
- package/dist/cli/commands/config.d.ts +8 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +107 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/cultivate.d.ts +16 -0
- package/dist/cli/commands/cultivate.d.ts.map +1 -0
- package/dist/cli/commands/cultivate.js +254 -0
- package/dist/cli/commands/cultivate.js.map +1 -0
- package/dist/cli/commands/diagnostics.d.ts +8 -0
- package/dist/cli/commands/diagnostics.d.ts.map +1 -0
- package/dist/cli/commands/diagnostics.js +140 -0
- package/dist/cli/commands/diagnostics.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +13 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/init-primitives.d.ts +19 -0
- package/dist/cli/commands/init-primitives.d.ts.map +1 -0
- package/dist/cli/commands/init-primitives.js +208 -0
- package/dist/cli/commands/init-primitives.js.map +1 -0
- package/dist/cli/commands/sop.d.ts +14 -0
- package/dist/cli/commands/sop.d.ts.map +1 -0
- package/dist/cli/commands/sop.js +598 -0
- package/dist/cli/commands/sop.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +40 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +153 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +141 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/manager.d.ts +136 -0
- package/dist/config/manager.d.ts.map +1 -0
- package/dist/config/types.d.ts +127 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/core/cache.d.ts +185 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js +435 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/cultivation/deep-analyzer.d.ts +129 -0
- package/dist/cultivation/deep-analyzer.d.ts.map +1 -0
- package/dist/cultivation/deep-analyzer.js +322 -0
- package/dist/cultivation/deep-analyzer.js.map +1 -0
- package/dist/cultivation/index.d.ts +13 -0
- package/dist/cultivation/index.d.ts.map +1 -0
- package/dist/cultivation/seed-generator.d.ts +92 -0
- package/dist/cultivation/seed-generator.d.ts.map +1 -0
- package/dist/cultivation/seed-generator.js +1033 -0
- package/dist/cultivation/seed-generator.js.map +1 -0
- package/dist/cultivation/types.d.ts +230 -0
- package/dist/cultivation/types.d.ts.map +1 -0
- package/dist/generators/claude-md.d.ts +7 -0
- package/dist/generators/claude-md.d.ts.map +1 -1
- package/dist/generators/claude-md.js.map +1 -1
- package/dist/generators/docs-init.d.ts +6 -0
- package/dist/generators/docs-init.d.ts.map +1 -1
- package/dist/generators/docs-init.js.map +1 -1
- package/dist/health/checks.d.ts +135 -0
- package/dist/health/checks.d.ts.map +1 -0
- package/dist/health/index.d.ts +119 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +191 -0
- package/dist/health/index.js.map +1 -0
- package/dist/health/monitor.d.ts +146 -0
- package/dist/health/monitor.d.ts.map +1 -0
- package/dist/health/types.d.ts +135 -0
- package/dist/health/types.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +173 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/auto-commit.d.ts +175 -0
- package/dist/integrations/auto-commit.d.ts.map +1 -0
- package/dist/integrations/auto-commit.js +399 -0
- package/dist/integrations/auto-commit.js.map +1 -0
- package/dist/integrations/git.d.ts +299 -0
- package/dist/integrations/git.d.ts.map +1 -0
- package/dist/integrations/git.js +465 -0
- package/dist/integrations/git.js.map +1 -0
- package/dist/mcp-server/bin.d.ts +11 -0
- package/dist/mcp-server/bin.d.ts.map +1 -0
- package/dist/mcp-server/handlers/index.d.ts +57 -0
- package/dist/mcp-server/handlers/index.d.ts.map +1 -0
- package/dist/mcp-server/handlers/index.js +235 -0
- package/dist/mcp-server/handlers/index.js.map +1 -0
- package/dist/mcp-server/index.d.ts +28 -0
- package/dist/mcp-server/index.d.ts.map +1 -0
- package/dist/mcp-server/server.d.ts +133 -0
- package/dist/mcp-server/server.d.ts.map +1 -0
- package/dist/mcp-server/server.js +280 -0
- package/dist/mcp-server/server.js.map +1 -0
- package/dist/mcp-server/tools/agents/index.d.ts +10 -0
- package/dist/mcp-server/tools/agents/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/agents/list.d.ts +19 -0
- package/dist/mcp-server/tools/agents/list.d.ts.map +1 -0
- package/dist/mcp-server/tools/agents/spawn.d.ts +19 -0
- package/dist/mcp-server/tools/agents/spawn.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/generate.d.ts +21 -0
- package/dist/mcp-server/tools/graph/generate.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/index.d.ts +11 -0
- package/dist/mcp-server/tools/graph/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/query.d.ts +22 -0
- package/dist/mcp-server/tools/graph/query.d.ts.map +1 -0
- package/dist/mcp-server/tools/graph/stats.d.ts +22 -0
- package/dist/mcp-server/tools/graph/stats.d.ts.map +1 -0
- package/dist/mcp-server/tools/health.d.ts +21 -0
- package/dist/mcp-server/tools/health.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +13 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/registry.d.ts +90 -0
- package/dist/mcp-server/tools/registry.d.ts.map +1 -0
- package/dist/mcp-server/tools/registry.js +663 -0
- package/dist/mcp-server/tools/registry.js.map +1 -0
- package/dist/mcp-server/tools/search/index.d.ts +10 -0
- package/dist/mcp-server/tools/search/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/search/nodes.d.ts +22 -0
- package/dist/mcp-server/tools/search/nodes.d.ts.map +1 -0
- package/dist/mcp-server/tools/search/tags.d.ts +22 -0
- package/dist/mcp-server/tools/search/tags.d.ts.map +1 -0
- package/dist/mcp-server/types/index.d.ts +286 -0
- package/dist/mcp-server/types/index.d.ts.map +1 -0
- package/dist/memory/index.d.ts +10 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/vault-sync.d.ts +212 -0
- package/dist/memory/vault-sync.d.ts.map +1 -0
- package/dist/memory/vault-sync.js +463 -0
- package/dist/memory/vault-sync.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +296 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +71 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +26 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +407 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1332 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +71 -0
- package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
- package/dist/node_modules/ajv/dist/ajv.js +84 -0
- package/dist/node_modules/ajv/dist/ajv.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js +160 -0
- package/dist/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js +728 -0
- package/dist/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js +152 -0
- package/dist/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/errors.js +131 -0
- package/dist/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/index.js +234 -0
- package/dist/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/names.js +44 -0
- package/dist/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js +22 -0
- package/dist/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js +163 -0
- package/dist/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/rules.js +35 -0
- package/dist/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/util.js +173 -0
- package/dist/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
- package/dist/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js +58 -0
- package/dist/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js +193 -0
- package/dist/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js +43 -0
- package/dist/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js +522 -0
- package/dist/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js +126 -0
- package/dist/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js +89 -0
- package/dist/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/dist/node_modules/ajv/dist/core.js +628 -0
- package/dist/node_modules/ajv/dist/core.js.map +1 -0
- package/dist/node_modules/ajv/dist/refs/data.json.js +24 -0
- package/dist/node_modules/ajv/dist/refs/data.json.js.map +1 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +25 -0
- package/dist/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js +16 -0
- package/dist/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js +30 -0
- package/dist/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js +16 -0
- package/dist/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js +20 -0
- package/dist/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +59 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +114 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js +32 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js +100 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +103 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js +68 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js +64 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js +43 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +64 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +81 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js +66 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +49 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +23 -0
- package/dist/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js +140 -0
- package/dist/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js +132 -0
- package/dist/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js +114 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
- package/dist/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
- package/dist/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js +95 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js +16 -0
- package/dist/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
- package/dist/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js +36 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js +56 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js +52 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js +39 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +37 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +33 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js +34 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js +89 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
- package/dist/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/formats.js +209 -0
- package/dist/node_modules/ajv-formats/dist/formats.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/index.js +51 -0
- package/dist/node_modules/ajv-formats/dist/index.js.map +1 -0
- package/dist/node_modules/ajv-formats/dist/limit.js +80 -0
- package/dist/node_modules/ajv-formats/dist/limit.js.map +1 -0
- package/dist/node_modules/fast-deep-equal/index.js +39 -0
- package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/node_modules/fast-uri/index.js +261 -0
- package/dist/node_modules/fast-uri/index.js.map +1 -0
- package/dist/node_modules/fast-uri/lib/schemes.js +215 -0
- package/dist/node_modules/fast-uri/lib/schemes.js.map +1 -0
- package/dist/node_modules/fast-uri/lib/utils.js +261 -0
- package/dist/node_modules/fast-uri/lib/utils.js.map +1 -0
- package/dist/node_modules/json-schema-traverse/index.js +92 -0
- package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.js +37 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.js +43 -0
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +13 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +688 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +492 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +405 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +58 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +38 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +82 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +60 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +87 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +52 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +1283 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +341 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +2 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
- package/dist/reasoning/index.d.ts +74 -0
- package/dist/reasoning/index.d.ts.map +1 -0
- package/dist/reasoning/index.js +124 -0
- package/dist/reasoning/index.js.map +1 -0
- package/dist/reasoning/tracker.d.ts +210 -0
- package/dist/reasoning/tracker.d.ts.map +1 -0
- package/dist/reasoning/types.d.ts +146 -0
- package/dist/reasoning/types.d.ts.map +1 -0
- package/dist/recovery/backup.d.ts +110 -0
- package/dist/recovery/backup.d.ts.map +1 -0
- package/dist/recovery/index.d.ts +70 -0
- package/dist/recovery/index.d.ts.map +1 -0
- package/dist/recovery/index.js +186 -0
- package/dist/recovery/index.js.map +1 -0
- package/dist/recovery/integrity.d.ts +74 -0
- package/dist/recovery/integrity.d.ts.map +1 -0
- package/dist/recovery/types.d.ts +94 -0
- package/dist/recovery/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +130 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +134 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/manager.d.ts +140 -0
- package/dist/services/manager.d.ts.map +1 -0
- package/dist/services/types.d.ts +106 -0
- package/dist/services/types.d.ts.map +1 -0
- package/dist/services/watchers.d.ts +95 -0
- package/dist/services/watchers.d.ts.map +1 -0
- package/dist/sops/compliance-checker.d.ts +83 -0
- package/dist/sops/compliance-checker.d.ts.map +1 -0
- package/dist/sops/compliance-checker.js +399 -0
- package/dist/sops/compliance-checker.js.map +1 -0
- package/dist/sops/gap-analyzer.d.ts +124 -0
- package/dist/sops/gap-analyzer.d.ts.map +1 -0
- package/dist/sops/gap-analyzer.js +313 -0
- package/dist/sops/gap-analyzer.js.map +1 -0
- package/dist/sops/index.d.ts +14 -0
- package/dist/sops/index.d.ts.map +1 -0
- package/dist/sops/overlay-manager.d.ts +115 -0
- package/dist/sops/overlay-manager.d.ts.map +1 -0
- package/dist/sops/overlay-manager.js +394 -0
- package/dist/sops/overlay-manager.js.map +1 -0
- package/dist/sops/registry.d.ts +73 -0
- package/dist/sops/registry.d.ts.map +1 -0
- package/dist/sops/registry.js +919 -0
- package/dist/sops/registry.js.map +1 -0
- package/dist/sops/types.d.ts +377 -0
- package/dist/sops/types.d.ts.map +1 -0
- package/dist/sops/types.js +46 -0
- package/dist/sops/types.js.map +1 -0
- package/dist/utils/error-recovery.d.ts +230 -0
- package/dist/utils/error-recovery.d.ts.map +1 -0
- package/dist/utils/error-recovery.js +228 -0
- package/dist/utils/error-recovery.js.map +1 -0
- package/dist/utils/error-taxonomy.d.ts +149 -0
- package/dist/utils/error-taxonomy.d.ts.map +1 -0
- package/dist/utils/error-taxonomy.js +260 -0
- package/dist/utils/error-taxonomy.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +139 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +311 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/workflows/index.d.ts +11 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/registry.d.ts +118 -0
- package/dist/workflows/registry.d.ts.map +1 -0
- package/dist/workflows/registry.js +575 -0
- package/dist/workflows/registry.js.map +1 -0
- package/dist/workflows/types.d.ts +322 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/types.js +16 -0
- package/dist/workflows/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
import { datetime, date, time, duration } from "./iso.js";
|
|
2
|
+
import { parse, safeParse, parseAsync, safeParseAsync } from "./parse.js";
|
|
3
|
+
import { _custom, _string, _number, _unknown, _array, _boolean, _email, _url, _jwt, _emoji, _guid, _uuid, _uuidv4, _uuidv6, _uuidv7, _nanoid, _cuid, _cuid2, _ulid, _base64, _base64url, _xid, _ksuid, _ipv4, _ipv6, _cidrv4, _cidrv6, _e164, _gt, _gte, _lt, _lte, _multipleOf, _minLength, _maxLength, _length, _overwrite, _never, _regex, _includes, _startsWith, _endsWith, _lowercase, _uppercase, _trim, _normalize, _toLowerCase, _toUpperCase, _int, _refine } from "../core/api.js";
|
|
4
|
+
import { $constructor } from "../core/core.js";
|
|
5
|
+
import { normalizeParams, assignProp, defineLazy, extend, merge, pick, omit, partial, required, issue, clone } from "../core/util.js";
|
|
6
|
+
import { $ZodObject, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodNonOptional, $ZodPipe, $ZodString, $ZodNumber, $ZodBoolean, $ZodUnknown, $ZodArray, $ZodType, $ZodCustom, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodCatch, $ZodReadonly, $ZodStringFormat, $ZodEmail, $ZodGUID, $ZodUUID, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodIPv4, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumberFormat, $ZodNever } from "../core/schemas.js";
|
|
7
|
+
import { globalRegistry } from "../core/registries.js";
|
|
8
|
+
import { $ZodCheck } from "../core/checks.js";
|
|
9
|
+
const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
10
|
+
$ZodType.init(inst, def);
|
|
11
|
+
inst.def = def;
|
|
12
|
+
Object.defineProperty(inst, "_def", { value: def });
|
|
13
|
+
inst.check = (...checks) => {
|
|
14
|
+
return inst.clone(
|
|
15
|
+
{
|
|
16
|
+
...def,
|
|
17
|
+
checks: [
|
|
18
|
+
...def.checks ?? [],
|
|
19
|
+
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
// { parent: true }
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
26
|
+
inst.brand = () => inst;
|
|
27
|
+
inst.register = ((reg, meta) => {
|
|
28
|
+
reg.add(inst, meta);
|
|
29
|
+
return inst;
|
|
30
|
+
});
|
|
31
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
32
|
+
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
33
|
+
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
34
|
+
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
35
|
+
inst.spa = inst.safeParseAsync;
|
|
36
|
+
inst.refine = (check2, params) => inst.check(refine(check2, params));
|
|
37
|
+
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
38
|
+
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
39
|
+
inst.optional = () => optional(inst);
|
|
40
|
+
inst.nullable = () => nullable(inst);
|
|
41
|
+
inst.nullish = () => optional(nullable(inst));
|
|
42
|
+
inst.nonoptional = (params) => nonoptional(inst, params);
|
|
43
|
+
inst.array = () => array(inst);
|
|
44
|
+
inst.or = (arg) => union([inst, arg]);
|
|
45
|
+
inst.and = (arg) => intersection(inst, arg);
|
|
46
|
+
inst.transform = (tx) => pipe(inst, transform(tx));
|
|
47
|
+
inst.default = (def2) => _default(inst, def2);
|
|
48
|
+
inst.prefault = (def2) => prefault(inst, def2);
|
|
49
|
+
inst.catch = (params) => _catch(inst, params);
|
|
50
|
+
inst.pipe = (target) => pipe(inst, target);
|
|
51
|
+
inst.readonly = () => readonly(inst);
|
|
52
|
+
inst.describe = (description) => {
|
|
53
|
+
const cl = inst.clone();
|
|
54
|
+
globalRegistry.add(cl, { description });
|
|
55
|
+
return cl;
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(inst, "description", {
|
|
58
|
+
get() {
|
|
59
|
+
return globalRegistry.get(inst)?.description;
|
|
60
|
+
},
|
|
61
|
+
configurable: true
|
|
62
|
+
});
|
|
63
|
+
inst.meta = (...args) => {
|
|
64
|
+
if (args.length === 0) {
|
|
65
|
+
return globalRegistry.get(inst);
|
|
66
|
+
}
|
|
67
|
+
const cl = inst.clone();
|
|
68
|
+
globalRegistry.add(cl, args[0]);
|
|
69
|
+
return cl;
|
|
70
|
+
};
|
|
71
|
+
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
72
|
+
inst.isNullable = () => inst.safeParse(null).success;
|
|
73
|
+
return inst;
|
|
74
|
+
});
|
|
75
|
+
const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
76
|
+
$ZodString.init(inst, def);
|
|
77
|
+
ZodType.init(inst, def);
|
|
78
|
+
const bag = inst._zod.bag;
|
|
79
|
+
inst.format = bag.format ?? null;
|
|
80
|
+
inst.minLength = bag.minimum ?? null;
|
|
81
|
+
inst.maxLength = bag.maximum ?? null;
|
|
82
|
+
inst.regex = (...args) => inst.check(_regex(...args));
|
|
83
|
+
inst.includes = (...args) => inst.check(_includes(...args));
|
|
84
|
+
inst.startsWith = (...args) => inst.check(_startsWith(...args));
|
|
85
|
+
inst.endsWith = (...args) => inst.check(_endsWith(...args));
|
|
86
|
+
inst.min = (...args) => inst.check(_minLength(...args));
|
|
87
|
+
inst.max = (...args) => inst.check(_maxLength(...args));
|
|
88
|
+
inst.length = (...args) => inst.check(_length(...args));
|
|
89
|
+
inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
|
|
90
|
+
inst.lowercase = (params) => inst.check(_lowercase(params));
|
|
91
|
+
inst.uppercase = (params) => inst.check(_uppercase(params));
|
|
92
|
+
inst.trim = () => inst.check(_trim());
|
|
93
|
+
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
94
|
+
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
95
|
+
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
96
|
+
});
|
|
97
|
+
const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
98
|
+
$ZodString.init(inst, def);
|
|
99
|
+
_ZodString.init(inst, def);
|
|
100
|
+
inst.email = (params) => inst.check(_email(ZodEmail, params));
|
|
101
|
+
inst.url = (params) => inst.check(_url(ZodURL, params));
|
|
102
|
+
inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
|
|
103
|
+
inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
|
|
104
|
+
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
105
|
+
inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
|
|
106
|
+
inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
|
|
107
|
+
inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
|
|
108
|
+
inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
|
|
109
|
+
inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
|
|
110
|
+
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
111
|
+
inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
|
|
112
|
+
inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
|
|
113
|
+
inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
|
|
114
|
+
inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
|
|
115
|
+
inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
|
|
116
|
+
inst.xid = (params) => inst.check(_xid(ZodXID, params));
|
|
117
|
+
inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
|
|
118
|
+
inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
|
|
119
|
+
inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
|
|
120
|
+
inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
|
|
121
|
+
inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
|
|
122
|
+
inst.e164 = (params) => inst.check(_e164(ZodE164, params));
|
|
123
|
+
inst.datetime = (params) => inst.check(datetime(params));
|
|
124
|
+
inst.date = (params) => inst.check(date(params));
|
|
125
|
+
inst.time = (params) => inst.check(time(params));
|
|
126
|
+
inst.duration = (params) => inst.check(duration(params));
|
|
127
|
+
});
|
|
128
|
+
function string(params) {
|
|
129
|
+
return _string(ZodString, params);
|
|
130
|
+
}
|
|
131
|
+
const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
|
|
132
|
+
$ZodStringFormat.init(inst, def);
|
|
133
|
+
_ZodString.init(inst, def);
|
|
134
|
+
});
|
|
135
|
+
const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
|
|
136
|
+
$ZodEmail.init(inst, def);
|
|
137
|
+
ZodStringFormat.init(inst, def);
|
|
138
|
+
});
|
|
139
|
+
const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
|
|
140
|
+
$ZodGUID.init(inst, def);
|
|
141
|
+
ZodStringFormat.init(inst, def);
|
|
142
|
+
});
|
|
143
|
+
const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
|
|
144
|
+
$ZodUUID.init(inst, def);
|
|
145
|
+
ZodStringFormat.init(inst, def);
|
|
146
|
+
});
|
|
147
|
+
const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
|
|
148
|
+
$ZodURL.init(inst, def);
|
|
149
|
+
ZodStringFormat.init(inst, def);
|
|
150
|
+
});
|
|
151
|
+
const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
|
|
152
|
+
$ZodEmoji.init(inst, def);
|
|
153
|
+
ZodStringFormat.init(inst, def);
|
|
154
|
+
});
|
|
155
|
+
const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
|
|
156
|
+
$ZodNanoID.init(inst, def);
|
|
157
|
+
ZodStringFormat.init(inst, def);
|
|
158
|
+
});
|
|
159
|
+
const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
|
|
160
|
+
$ZodCUID.init(inst, def);
|
|
161
|
+
ZodStringFormat.init(inst, def);
|
|
162
|
+
});
|
|
163
|
+
const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
|
|
164
|
+
$ZodCUID2.init(inst, def);
|
|
165
|
+
ZodStringFormat.init(inst, def);
|
|
166
|
+
});
|
|
167
|
+
const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
|
|
168
|
+
$ZodULID.init(inst, def);
|
|
169
|
+
ZodStringFormat.init(inst, def);
|
|
170
|
+
});
|
|
171
|
+
const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
|
|
172
|
+
$ZodXID.init(inst, def);
|
|
173
|
+
ZodStringFormat.init(inst, def);
|
|
174
|
+
});
|
|
175
|
+
const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
|
|
176
|
+
$ZodKSUID.init(inst, def);
|
|
177
|
+
ZodStringFormat.init(inst, def);
|
|
178
|
+
});
|
|
179
|
+
const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
|
|
180
|
+
$ZodIPv4.init(inst, def);
|
|
181
|
+
ZodStringFormat.init(inst, def);
|
|
182
|
+
});
|
|
183
|
+
const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
|
|
184
|
+
$ZodIPv6.init(inst, def);
|
|
185
|
+
ZodStringFormat.init(inst, def);
|
|
186
|
+
});
|
|
187
|
+
const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
|
|
188
|
+
$ZodCIDRv4.init(inst, def);
|
|
189
|
+
ZodStringFormat.init(inst, def);
|
|
190
|
+
});
|
|
191
|
+
const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
|
|
192
|
+
$ZodCIDRv6.init(inst, def);
|
|
193
|
+
ZodStringFormat.init(inst, def);
|
|
194
|
+
});
|
|
195
|
+
const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
|
|
196
|
+
$ZodBase64.init(inst, def);
|
|
197
|
+
ZodStringFormat.init(inst, def);
|
|
198
|
+
});
|
|
199
|
+
const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
|
|
200
|
+
$ZodBase64URL.init(inst, def);
|
|
201
|
+
ZodStringFormat.init(inst, def);
|
|
202
|
+
});
|
|
203
|
+
const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
|
|
204
|
+
$ZodE164.init(inst, def);
|
|
205
|
+
ZodStringFormat.init(inst, def);
|
|
206
|
+
});
|
|
207
|
+
const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
208
|
+
$ZodJWT.init(inst, def);
|
|
209
|
+
ZodStringFormat.init(inst, def);
|
|
210
|
+
});
|
|
211
|
+
const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
212
|
+
$ZodNumber.init(inst, def);
|
|
213
|
+
ZodType.init(inst, def);
|
|
214
|
+
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
215
|
+
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
216
|
+
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
217
|
+
inst.lt = (value, params) => inst.check(_lt(value, params));
|
|
218
|
+
inst.lte = (value, params) => inst.check(_lte(value, params));
|
|
219
|
+
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
220
|
+
inst.int = (params) => inst.check(int(params));
|
|
221
|
+
inst.safe = (params) => inst.check(int(params));
|
|
222
|
+
inst.positive = (params) => inst.check(_gt(0, params));
|
|
223
|
+
inst.nonnegative = (params) => inst.check(_gte(0, params));
|
|
224
|
+
inst.negative = (params) => inst.check(_lt(0, params));
|
|
225
|
+
inst.nonpositive = (params) => inst.check(_lte(0, params));
|
|
226
|
+
inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
|
|
227
|
+
inst.step = (value, params) => inst.check(_multipleOf(value, params));
|
|
228
|
+
inst.finite = () => inst;
|
|
229
|
+
const bag = inst._zod.bag;
|
|
230
|
+
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
231
|
+
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
232
|
+
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
|
|
233
|
+
inst.isFinite = true;
|
|
234
|
+
inst.format = bag.format ?? null;
|
|
235
|
+
});
|
|
236
|
+
function number(params) {
|
|
237
|
+
return _number(ZodNumber, params);
|
|
238
|
+
}
|
|
239
|
+
const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
|
|
240
|
+
$ZodNumberFormat.init(inst, def);
|
|
241
|
+
ZodNumber.init(inst, def);
|
|
242
|
+
});
|
|
243
|
+
function int(params) {
|
|
244
|
+
return _int(ZodNumberFormat, params);
|
|
245
|
+
}
|
|
246
|
+
const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
247
|
+
$ZodBoolean.init(inst, def);
|
|
248
|
+
ZodType.init(inst, def);
|
|
249
|
+
});
|
|
250
|
+
function boolean(params) {
|
|
251
|
+
return _boolean(ZodBoolean, params);
|
|
252
|
+
}
|
|
253
|
+
const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
254
|
+
$ZodUnknown.init(inst, def);
|
|
255
|
+
ZodType.init(inst, def);
|
|
256
|
+
});
|
|
257
|
+
function unknown() {
|
|
258
|
+
return _unknown(ZodUnknown);
|
|
259
|
+
}
|
|
260
|
+
const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
261
|
+
$ZodNever.init(inst, def);
|
|
262
|
+
ZodType.init(inst, def);
|
|
263
|
+
});
|
|
264
|
+
function never(params) {
|
|
265
|
+
return _never(ZodNever, params);
|
|
266
|
+
}
|
|
267
|
+
const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
268
|
+
$ZodArray.init(inst, def);
|
|
269
|
+
ZodType.init(inst, def);
|
|
270
|
+
inst.element = def.element;
|
|
271
|
+
inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
|
|
272
|
+
inst.nonempty = (params) => inst.check(_minLength(1, params));
|
|
273
|
+
inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
|
|
274
|
+
inst.length = (len, params) => inst.check(_length(len, params));
|
|
275
|
+
inst.unwrap = () => inst.element;
|
|
276
|
+
});
|
|
277
|
+
function array(element, params) {
|
|
278
|
+
return _array(ZodArray, element, params);
|
|
279
|
+
}
|
|
280
|
+
const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
281
|
+
$ZodObject.init(inst, def);
|
|
282
|
+
ZodType.init(inst, def);
|
|
283
|
+
defineLazy(inst, "shape", () => def.shape);
|
|
284
|
+
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
285
|
+
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
|
|
286
|
+
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
287
|
+
inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
288
|
+
inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
|
|
289
|
+
inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
|
|
290
|
+
inst.extend = (incoming) => {
|
|
291
|
+
return extend(inst, incoming);
|
|
292
|
+
};
|
|
293
|
+
inst.merge = (other) => merge(inst, other);
|
|
294
|
+
inst.pick = (mask) => pick(inst, mask);
|
|
295
|
+
inst.omit = (mask) => omit(inst, mask);
|
|
296
|
+
inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
|
|
297
|
+
inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
|
|
298
|
+
});
|
|
299
|
+
function object(shape, params) {
|
|
300
|
+
const def = {
|
|
301
|
+
type: "object",
|
|
302
|
+
get shape() {
|
|
303
|
+
assignProp(this, "shape", { ...shape });
|
|
304
|
+
return this.shape;
|
|
305
|
+
},
|
|
306
|
+
...normalizeParams(params)
|
|
307
|
+
};
|
|
308
|
+
return new ZodObject(def);
|
|
309
|
+
}
|
|
310
|
+
function looseObject(shape, params) {
|
|
311
|
+
return new ZodObject({
|
|
312
|
+
type: "object",
|
|
313
|
+
get shape() {
|
|
314
|
+
assignProp(this, "shape", { ...shape });
|
|
315
|
+
return this.shape;
|
|
316
|
+
},
|
|
317
|
+
catchall: unknown(),
|
|
318
|
+
...normalizeParams(params)
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
322
|
+
$ZodUnion.init(inst, def);
|
|
323
|
+
ZodType.init(inst, def);
|
|
324
|
+
inst.options = def.options;
|
|
325
|
+
});
|
|
326
|
+
function union(options, params) {
|
|
327
|
+
return new ZodUnion({
|
|
328
|
+
type: "union",
|
|
329
|
+
options,
|
|
330
|
+
...normalizeParams(params)
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
const ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
|
|
334
|
+
ZodUnion.init(inst, def);
|
|
335
|
+
$ZodDiscriminatedUnion.init(inst, def);
|
|
336
|
+
});
|
|
337
|
+
function discriminatedUnion(discriminator, options, params) {
|
|
338
|
+
return new ZodDiscriminatedUnion({
|
|
339
|
+
type: "union",
|
|
340
|
+
options,
|
|
341
|
+
discriminator,
|
|
342
|
+
...normalizeParams(params)
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
|
|
346
|
+
$ZodIntersection.init(inst, def);
|
|
347
|
+
ZodType.init(inst, def);
|
|
348
|
+
});
|
|
349
|
+
function intersection(left, right) {
|
|
350
|
+
return new ZodIntersection({
|
|
351
|
+
type: "intersection",
|
|
352
|
+
left,
|
|
353
|
+
right
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
357
|
+
$ZodRecord.init(inst, def);
|
|
358
|
+
ZodType.init(inst, def);
|
|
359
|
+
inst.keyType = def.keyType;
|
|
360
|
+
inst.valueType = def.valueType;
|
|
361
|
+
});
|
|
362
|
+
function record(keyType, valueType, params) {
|
|
363
|
+
return new ZodRecord({
|
|
364
|
+
type: "record",
|
|
365
|
+
keyType,
|
|
366
|
+
valueType,
|
|
367
|
+
...normalizeParams(params)
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
371
|
+
$ZodEnum.init(inst, def);
|
|
372
|
+
ZodType.init(inst, def);
|
|
373
|
+
inst.enum = def.entries;
|
|
374
|
+
inst.options = Object.values(def.entries);
|
|
375
|
+
const keys = new Set(Object.keys(def.entries));
|
|
376
|
+
inst.extract = (values, params) => {
|
|
377
|
+
const newEntries = {};
|
|
378
|
+
for (const value of values) {
|
|
379
|
+
if (keys.has(value)) {
|
|
380
|
+
newEntries[value] = def.entries[value];
|
|
381
|
+
} else
|
|
382
|
+
throw new Error(`Key ${value} not found in enum`);
|
|
383
|
+
}
|
|
384
|
+
return new ZodEnum({
|
|
385
|
+
...def,
|
|
386
|
+
checks: [],
|
|
387
|
+
...normalizeParams(params),
|
|
388
|
+
entries: newEntries
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
inst.exclude = (values, params) => {
|
|
392
|
+
const newEntries = { ...def.entries };
|
|
393
|
+
for (const value of values) {
|
|
394
|
+
if (keys.has(value)) {
|
|
395
|
+
delete newEntries[value];
|
|
396
|
+
} else
|
|
397
|
+
throw new Error(`Key ${value} not found in enum`);
|
|
398
|
+
}
|
|
399
|
+
return new ZodEnum({
|
|
400
|
+
...def,
|
|
401
|
+
checks: [],
|
|
402
|
+
...normalizeParams(params),
|
|
403
|
+
entries: newEntries
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
});
|
|
407
|
+
function _enum(values, params) {
|
|
408
|
+
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
|
409
|
+
return new ZodEnum({
|
|
410
|
+
type: "enum",
|
|
411
|
+
entries,
|
|
412
|
+
...normalizeParams(params)
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
const ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
416
|
+
$ZodLiteral.init(inst, def);
|
|
417
|
+
ZodType.init(inst, def);
|
|
418
|
+
inst.values = new Set(def.values);
|
|
419
|
+
Object.defineProperty(inst, "value", {
|
|
420
|
+
get() {
|
|
421
|
+
if (def.values.length > 1) {
|
|
422
|
+
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
423
|
+
}
|
|
424
|
+
return def.values[0];
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
function literal(value, params) {
|
|
429
|
+
return new ZodLiteral({
|
|
430
|
+
type: "literal",
|
|
431
|
+
values: Array.isArray(value) ? value : [value],
|
|
432
|
+
...normalizeParams(params)
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
436
|
+
$ZodTransform.init(inst, def);
|
|
437
|
+
ZodType.init(inst, def);
|
|
438
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
439
|
+
payload.addIssue = (issue$1) => {
|
|
440
|
+
if (typeof issue$1 === "string") {
|
|
441
|
+
payload.issues.push(issue(issue$1, payload.value, def));
|
|
442
|
+
} else {
|
|
443
|
+
const _issue = issue$1;
|
|
444
|
+
if (_issue.fatal)
|
|
445
|
+
_issue.continue = false;
|
|
446
|
+
_issue.code ?? (_issue.code = "custom");
|
|
447
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
448
|
+
_issue.inst ?? (_issue.inst = inst);
|
|
449
|
+
_issue.continue ?? (_issue.continue = true);
|
|
450
|
+
payload.issues.push(issue(_issue));
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
const output = def.transform(payload.value, payload);
|
|
454
|
+
if (output instanceof Promise) {
|
|
455
|
+
return output.then((output2) => {
|
|
456
|
+
payload.value = output2;
|
|
457
|
+
return payload;
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
payload.value = output;
|
|
461
|
+
return payload;
|
|
462
|
+
};
|
|
463
|
+
});
|
|
464
|
+
function transform(fn) {
|
|
465
|
+
return new ZodTransform({
|
|
466
|
+
type: "transform",
|
|
467
|
+
transform: fn
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
const ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
471
|
+
$ZodOptional.init(inst, def);
|
|
472
|
+
ZodType.init(inst, def);
|
|
473
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
474
|
+
});
|
|
475
|
+
function optional(innerType) {
|
|
476
|
+
return new ZodOptional({
|
|
477
|
+
type: "optional",
|
|
478
|
+
innerType
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
|
|
482
|
+
$ZodNullable.init(inst, def);
|
|
483
|
+
ZodType.init(inst, def);
|
|
484
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
485
|
+
});
|
|
486
|
+
function nullable(innerType) {
|
|
487
|
+
return new ZodNullable({
|
|
488
|
+
type: "nullable",
|
|
489
|
+
innerType
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
const ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
|
|
493
|
+
$ZodDefault.init(inst, def);
|
|
494
|
+
ZodType.init(inst, def);
|
|
495
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
496
|
+
inst.removeDefault = inst.unwrap;
|
|
497
|
+
});
|
|
498
|
+
function _default(innerType, defaultValue) {
|
|
499
|
+
return new ZodDefault({
|
|
500
|
+
type: "default",
|
|
501
|
+
innerType,
|
|
502
|
+
get defaultValue() {
|
|
503
|
+
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
const ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
|
|
508
|
+
$ZodPrefault.init(inst, def);
|
|
509
|
+
ZodType.init(inst, def);
|
|
510
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
511
|
+
});
|
|
512
|
+
function prefault(innerType, defaultValue) {
|
|
513
|
+
return new ZodPrefault({
|
|
514
|
+
type: "prefault",
|
|
515
|
+
innerType,
|
|
516
|
+
get defaultValue() {
|
|
517
|
+
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
const ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
|
|
522
|
+
$ZodNonOptional.init(inst, def);
|
|
523
|
+
ZodType.init(inst, def);
|
|
524
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
525
|
+
});
|
|
526
|
+
function nonoptional(innerType, params) {
|
|
527
|
+
return new ZodNonOptional({
|
|
528
|
+
type: "nonoptional",
|
|
529
|
+
innerType,
|
|
530
|
+
...normalizeParams(params)
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
const ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
|
|
534
|
+
$ZodCatch.init(inst, def);
|
|
535
|
+
ZodType.init(inst, def);
|
|
536
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
537
|
+
inst.removeCatch = inst.unwrap;
|
|
538
|
+
});
|
|
539
|
+
function _catch(innerType, catchValue) {
|
|
540
|
+
return new ZodCatch({
|
|
541
|
+
type: "catch",
|
|
542
|
+
innerType,
|
|
543
|
+
catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
547
|
+
$ZodPipe.init(inst, def);
|
|
548
|
+
ZodType.init(inst, def);
|
|
549
|
+
inst.in = def.in;
|
|
550
|
+
inst.out = def.out;
|
|
551
|
+
});
|
|
552
|
+
function pipe(in_, out) {
|
|
553
|
+
return new ZodPipe({
|
|
554
|
+
type: "pipe",
|
|
555
|
+
in: in_,
|
|
556
|
+
out
|
|
557
|
+
// ...util.normalizeParams(params),
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
561
|
+
$ZodReadonly.init(inst, def);
|
|
562
|
+
ZodType.init(inst, def);
|
|
563
|
+
});
|
|
564
|
+
function readonly(innerType) {
|
|
565
|
+
return new ZodReadonly({
|
|
566
|
+
type: "readonly",
|
|
567
|
+
innerType
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
571
|
+
$ZodCustom.init(inst, def);
|
|
572
|
+
ZodType.init(inst, def);
|
|
573
|
+
});
|
|
574
|
+
function check(fn) {
|
|
575
|
+
const ch = new $ZodCheck({
|
|
576
|
+
check: "custom"
|
|
577
|
+
// ...util.normalizeParams(params),
|
|
578
|
+
});
|
|
579
|
+
ch._zod.check = fn;
|
|
580
|
+
return ch;
|
|
581
|
+
}
|
|
582
|
+
function custom(fn, _params) {
|
|
583
|
+
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
584
|
+
}
|
|
585
|
+
function refine(fn, _params = {}) {
|
|
586
|
+
return _refine(ZodCustom, fn, _params);
|
|
587
|
+
}
|
|
588
|
+
function superRefine(fn) {
|
|
589
|
+
const ch = check((payload) => {
|
|
590
|
+
payload.addIssue = (issue$1) => {
|
|
591
|
+
if (typeof issue$1 === "string") {
|
|
592
|
+
payload.issues.push(issue(issue$1, payload.value, ch._zod.def));
|
|
593
|
+
} else {
|
|
594
|
+
const _issue = issue$1;
|
|
595
|
+
if (_issue.fatal)
|
|
596
|
+
_issue.continue = false;
|
|
597
|
+
_issue.code ?? (_issue.code = "custom");
|
|
598
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
599
|
+
_issue.inst ?? (_issue.inst = ch);
|
|
600
|
+
_issue.continue ?? (_issue.continue = !ch._zod.def.abort);
|
|
601
|
+
payload.issues.push(issue(_issue));
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
return fn(payload.value, payload);
|
|
605
|
+
});
|
|
606
|
+
return ch;
|
|
607
|
+
}
|
|
608
|
+
function preprocess(fn, schema) {
|
|
609
|
+
return pipe(transform(fn), schema);
|
|
610
|
+
}
|
|
611
|
+
export {
|
|
612
|
+
ZodArray,
|
|
613
|
+
ZodBase64,
|
|
614
|
+
ZodBase64URL,
|
|
615
|
+
ZodBoolean,
|
|
616
|
+
ZodCIDRv4,
|
|
617
|
+
ZodCIDRv6,
|
|
618
|
+
ZodCUID,
|
|
619
|
+
ZodCUID2,
|
|
620
|
+
ZodCatch,
|
|
621
|
+
ZodCustom,
|
|
622
|
+
ZodDefault,
|
|
623
|
+
ZodDiscriminatedUnion,
|
|
624
|
+
ZodE164,
|
|
625
|
+
ZodEmail,
|
|
626
|
+
ZodEmoji,
|
|
627
|
+
ZodEnum,
|
|
628
|
+
ZodGUID,
|
|
629
|
+
ZodIPv4,
|
|
630
|
+
ZodIPv6,
|
|
631
|
+
ZodIntersection,
|
|
632
|
+
ZodJWT,
|
|
633
|
+
ZodKSUID,
|
|
634
|
+
ZodLiteral,
|
|
635
|
+
ZodNanoID,
|
|
636
|
+
ZodNever,
|
|
637
|
+
ZodNonOptional,
|
|
638
|
+
ZodNullable,
|
|
639
|
+
ZodNumber,
|
|
640
|
+
ZodNumberFormat,
|
|
641
|
+
ZodObject,
|
|
642
|
+
ZodOptional,
|
|
643
|
+
ZodPipe,
|
|
644
|
+
ZodPrefault,
|
|
645
|
+
ZodReadonly,
|
|
646
|
+
ZodRecord,
|
|
647
|
+
ZodString,
|
|
648
|
+
ZodStringFormat,
|
|
649
|
+
ZodTransform,
|
|
650
|
+
ZodType,
|
|
651
|
+
ZodULID,
|
|
652
|
+
ZodURL,
|
|
653
|
+
ZodUUID,
|
|
654
|
+
ZodUnion,
|
|
655
|
+
ZodUnknown,
|
|
656
|
+
ZodXID,
|
|
657
|
+
_ZodString,
|
|
658
|
+
_default,
|
|
659
|
+
array,
|
|
660
|
+
boolean,
|
|
661
|
+
_catch as catch,
|
|
662
|
+
check,
|
|
663
|
+
custom,
|
|
664
|
+
discriminatedUnion,
|
|
665
|
+
_enum as enum,
|
|
666
|
+
int,
|
|
667
|
+
intersection,
|
|
668
|
+
literal,
|
|
669
|
+
looseObject,
|
|
670
|
+
never,
|
|
671
|
+
nonoptional,
|
|
672
|
+
nullable,
|
|
673
|
+
number,
|
|
674
|
+
object,
|
|
675
|
+
optional,
|
|
676
|
+
pipe,
|
|
677
|
+
prefault,
|
|
678
|
+
preprocess,
|
|
679
|
+
readonly,
|
|
680
|
+
record,
|
|
681
|
+
refine,
|
|
682
|
+
string,
|
|
683
|
+
superRefine,
|
|
684
|
+
transform,
|
|
685
|
+
union,
|
|
686
|
+
unknown
|
|
687
|
+
};
|
|
688
|
+
//# sourceMappingURL=schemas.js.map
|