@weavelogic/knowledge-graph-agent 0.1.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 +733 -152
- 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/analyze.d.ts +12 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +269 -0
- package/dist/cli/commands/analyze.js.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/convert.d.ts +15 -0
- package/dist/cli/commands/convert.d.ts.map +1 -0
- package/dist/cli/commands/convert.js +203 -0
- package/dist/cli/commands/convert.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 +52 -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-analyzer.d.ts +75 -0
- package/dist/generators/docs-analyzer.d.ts.map +1 -0
- package/dist/generators/docs-analyzer.js +567 -0
- package/dist/generators/docs-analyzer.js.map +1 -0
- package/dist/generators/docs-convert.d.ts +91 -0
- package/dist/generators/docs-convert.d.ts.map +1 -0
- package/dist/generators/docs-convert.js +474 -0
- package/dist/generators/docs-convert.js.map +1 -0
- 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 +34 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +179 -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 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sources":["../../../../../../../../node_modules/zod/v4/core/api.js"],"sourcesContent":["import * as checks from \"./checks.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : defaultValue;\n },\n });\n}\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// export function _refine<T>(\n// Class: util.SchemaClass<schemas.$ZodCustom>,\n// fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>,\n// _params: string | $ZodCustomParams = {}\n// ): checks.$ZodCheck<T> {\n// return _custom(Class, fn, _params);\n// }\n// same as _custom but defaults to abort:false\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Pipe = Classes.Pipe ?? schemas.$ZodPipe;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const _Transform = Classes.Transform ?? schemas.$ZodTransform;\n const tx = new _Transform({\n type: \"transform\",\n transform: (input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: tx,\n });\n return {};\n }\n },\n error: params.error,\n });\n // params.error;\n const innerPipe = new _Pipe({\n type: \"pipe\",\n in: new _String({ type: \"string\", error: params.error }),\n out: tx,\n error: params.error,\n });\n const outerPipe = new _Pipe({\n type: \"pipe\",\n in: innerPipe,\n out: new _Boolean({\n type: \"boolean\",\n error: params.error,\n }),\n error: params.error,\n });\n return outerPipe;\n}\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n"],"names":["util.normalizeParams","checks.$ZodCheckLessThan","checks.$ZodCheckGreaterThan","checks.$ZodCheckMultipleOf","checks.$ZodCheckMaxLength","checks.$ZodCheckMinLength","checks.$ZodCheckLengthEquals","checks.$ZodCheckRegex","checks.$ZodCheckLowerCase","checks.$ZodCheckUpperCase","checks.$ZodCheckIncludes","checks.$ZodCheckStartsWith","checks.$ZodCheckEndsWith","checks.$ZodCheckOverwrite"],"mappings":";;AAGO,SAAS,QAAQ,OAAO,QAAQ;AACnC,SAAO,IAAI,MAAM;AAAA,IACb,MAAM;AAAA,IACN,GAAGA,gBAAqB,MAAM;AAAA,EACtC,CAAK;AACL;AAQO,SAAS,OAAO,OAAO,QAAQ;AAClC,SAAO,IAAI,MAAM;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,IACP,GAAGA,gBAAqB,MAAM;AAAA,EACtC,CAAK;AACL;AACO,SAAS,MAAM,OAAO,QAAQ;AACjC,SAAO,IAAI,MAAM;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,IACP,GAAGA,gBAAqB,MAAM;AAAA,EACtC,CAAK;AACL;AACO,SAAS,MAAM,OAAO,QAAQ;AACjC,SAAO,IAAI,MAAM;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,OAAO;AAAA,IACP,GAAGA,gBAAqB,MAAM;AAAA,EACtC,CAAK;AACL;AACO,SAAS,QAAQ,OAAO,QAAQ;AACnC,SAAO,IAAI,MAAM;AAAA,IACb,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA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M;AAAA,IACN;AAAA;AAAA;AAAA;AAAA,IAIA,GAAGb,gBAAqB,MAAM;AAAA,EACtC,CAAK;AACL;AA2LO,SAAS,QAAQ,OAAO,IAAI,SAAS;AACxC,QAAM,OAAOA,gBAAqB,OAAO;AACzC,OAAK,UAAU,KAAK,QAAQ;AAC5B,QAAM,SAAS,IAAI,MAAM;AAAA,IACrB,MAAM;AAAA,IACN,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACX,CAAK;AACD,SAAO;AACX;AASO,SAAS,QAAQ,OAAO,IAAI,SAAS;AACxC,QAAM,SAAS,IAAI,MAAM;AAAA,IACrB,MAAM;AAAA,IACN,OAAO;AAAA,IACP;AAAA,IACA,GAAGA,gBAAqB,OAAO;AAAA,EACvC,CAAK;AACD,SAAO;AACX;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { $constructor } from "./core.js";
|
|
2
|
+
import { lowercase, uppercase, integer } from "./regexes.js";
|
|
3
|
+
import { floatSafeRemainder, nullish, getLengthableOrigin, escapeRegex, NUMBER_FORMAT_RANGES } from "./util.js";
|
|
4
|
+
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
5
|
+
var _a;
|
|
6
|
+
inst._zod ?? (inst._zod = {});
|
|
7
|
+
inst._zod.def = def;
|
|
8
|
+
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
9
|
+
});
|
|
10
|
+
const numericOriginMap = {
|
|
11
|
+
number: "number",
|
|
12
|
+
bigint: "bigint",
|
|
13
|
+
object: "date"
|
|
14
|
+
};
|
|
15
|
+
const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
16
|
+
$ZodCheck.init(inst, def);
|
|
17
|
+
const origin = numericOriginMap[typeof def.value];
|
|
18
|
+
inst._zod.onattach.push((inst2) => {
|
|
19
|
+
const bag = inst2._zod.bag;
|
|
20
|
+
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
21
|
+
if (def.value < curr) {
|
|
22
|
+
if (def.inclusive)
|
|
23
|
+
bag.maximum = def.value;
|
|
24
|
+
else
|
|
25
|
+
bag.exclusiveMaximum = def.value;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
inst._zod.check = (payload) => {
|
|
29
|
+
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
payload.issues.push({
|
|
33
|
+
origin,
|
|
34
|
+
code: "too_big",
|
|
35
|
+
maximum: def.value,
|
|
36
|
+
input: payload.value,
|
|
37
|
+
inclusive: def.inclusive,
|
|
38
|
+
inst,
|
|
39
|
+
continue: !def.abort
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
44
|
+
$ZodCheck.init(inst, def);
|
|
45
|
+
const origin = numericOriginMap[typeof def.value];
|
|
46
|
+
inst._zod.onattach.push((inst2) => {
|
|
47
|
+
const bag = inst2._zod.bag;
|
|
48
|
+
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
49
|
+
if (def.value > curr) {
|
|
50
|
+
if (def.inclusive)
|
|
51
|
+
bag.minimum = def.value;
|
|
52
|
+
else
|
|
53
|
+
bag.exclusiveMinimum = def.value;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
inst._zod.check = (payload) => {
|
|
57
|
+
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
payload.issues.push({
|
|
61
|
+
origin,
|
|
62
|
+
code: "too_small",
|
|
63
|
+
minimum: def.value,
|
|
64
|
+
input: payload.value,
|
|
65
|
+
inclusive: def.inclusive,
|
|
66
|
+
inst,
|
|
67
|
+
continue: !def.abort
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
72
|
+
$ZodCheck.init(inst, def);
|
|
73
|
+
inst._zod.onattach.push((inst2) => {
|
|
74
|
+
var _a;
|
|
75
|
+
(_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
|
|
76
|
+
});
|
|
77
|
+
inst._zod.check = (payload) => {
|
|
78
|
+
if (typeof payload.value !== typeof def.value)
|
|
79
|
+
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
80
|
+
const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0;
|
|
81
|
+
if (isMultiple)
|
|
82
|
+
return;
|
|
83
|
+
payload.issues.push({
|
|
84
|
+
origin: typeof payload.value,
|
|
85
|
+
code: "not_multiple_of",
|
|
86
|
+
divisor: def.value,
|
|
87
|
+
input: payload.value,
|
|
88
|
+
inst,
|
|
89
|
+
continue: !def.abort
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
|
|
94
|
+
$ZodCheck.init(inst, def);
|
|
95
|
+
def.format = def.format || "float64";
|
|
96
|
+
const isInt = def.format?.includes("int");
|
|
97
|
+
const origin = isInt ? "int" : "number";
|
|
98
|
+
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
99
|
+
inst._zod.onattach.push((inst2) => {
|
|
100
|
+
const bag = inst2._zod.bag;
|
|
101
|
+
bag.format = def.format;
|
|
102
|
+
bag.minimum = minimum;
|
|
103
|
+
bag.maximum = maximum;
|
|
104
|
+
if (isInt)
|
|
105
|
+
bag.pattern = integer;
|
|
106
|
+
});
|
|
107
|
+
inst._zod.check = (payload) => {
|
|
108
|
+
const input = payload.value;
|
|
109
|
+
if (isInt) {
|
|
110
|
+
if (!Number.isInteger(input)) {
|
|
111
|
+
payload.issues.push({
|
|
112
|
+
expected: origin,
|
|
113
|
+
format: def.format,
|
|
114
|
+
code: "invalid_type",
|
|
115
|
+
input,
|
|
116
|
+
inst
|
|
117
|
+
});
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (!Number.isSafeInteger(input)) {
|
|
121
|
+
if (input > 0) {
|
|
122
|
+
payload.issues.push({
|
|
123
|
+
input,
|
|
124
|
+
code: "too_big",
|
|
125
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
126
|
+
note: "Integers must be within the safe integer range.",
|
|
127
|
+
inst,
|
|
128
|
+
origin,
|
|
129
|
+
continue: !def.abort
|
|
130
|
+
});
|
|
131
|
+
} else {
|
|
132
|
+
payload.issues.push({
|
|
133
|
+
input,
|
|
134
|
+
code: "too_small",
|
|
135
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
136
|
+
note: "Integers must be within the safe integer range.",
|
|
137
|
+
inst,
|
|
138
|
+
origin,
|
|
139
|
+
continue: !def.abort
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (input < minimum) {
|
|
146
|
+
payload.issues.push({
|
|
147
|
+
origin: "number",
|
|
148
|
+
input,
|
|
149
|
+
code: "too_small",
|
|
150
|
+
minimum,
|
|
151
|
+
inclusive: true,
|
|
152
|
+
inst,
|
|
153
|
+
continue: !def.abort
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
if (input > maximum) {
|
|
157
|
+
payload.issues.push({
|
|
158
|
+
origin: "number",
|
|
159
|
+
input,
|
|
160
|
+
code: "too_big",
|
|
161
|
+
maximum,
|
|
162
|
+
inst
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
});
|
|
167
|
+
const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
168
|
+
var _a;
|
|
169
|
+
$ZodCheck.init(inst, def);
|
|
170
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
171
|
+
const val = payload.value;
|
|
172
|
+
return !nullish(val) && val.length !== void 0;
|
|
173
|
+
});
|
|
174
|
+
inst._zod.onattach.push((inst2) => {
|
|
175
|
+
const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
176
|
+
if (def.maximum < curr)
|
|
177
|
+
inst2._zod.bag.maximum = def.maximum;
|
|
178
|
+
});
|
|
179
|
+
inst._zod.check = (payload) => {
|
|
180
|
+
const input = payload.value;
|
|
181
|
+
const length = input.length;
|
|
182
|
+
if (length <= def.maximum)
|
|
183
|
+
return;
|
|
184
|
+
const origin = getLengthableOrigin(input);
|
|
185
|
+
payload.issues.push({
|
|
186
|
+
origin,
|
|
187
|
+
code: "too_big",
|
|
188
|
+
maximum: def.maximum,
|
|
189
|
+
inclusive: true,
|
|
190
|
+
input,
|
|
191
|
+
inst,
|
|
192
|
+
continue: !def.abort
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
});
|
|
196
|
+
const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
197
|
+
var _a;
|
|
198
|
+
$ZodCheck.init(inst, def);
|
|
199
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
200
|
+
const val = payload.value;
|
|
201
|
+
return !nullish(val) && val.length !== void 0;
|
|
202
|
+
});
|
|
203
|
+
inst._zod.onattach.push((inst2) => {
|
|
204
|
+
const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
205
|
+
if (def.minimum > curr)
|
|
206
|
+
inst2._zod.bag.minimum = def.minimum;
|
|
207
|
+
});
|
|
208
|
+
inst._zod.check = (payload) => {
|
|
209
|
+
const input = payload.value;
|
|
210
|
+
const length = input.length;
|
|
211
|
+
if (length >= def.minimum)
|
|
212
|
+
return;
|
|
213
|
+
const origin = getLengthableOrigin(input);
|
|
214
|
+
payload.issues.push({
|
|
215
|
+
origin,
|
|
216
|
+
code: "too_small",
|
|
217
|
+
minimum: def.minimum,
|
|
218
|
+
inclusive: true,
|
|
219
|
+
input,
|
|
220
|
+
inst,
|
|
221
|
+
continue: !def.abort
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
226
|
+
var _a;
|
|
227
|
+
$ZodCheck.init(inst, def);
|
|
228
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
229
|
+
const val = payload.value;
|
|
230
|
+
return !nullish(val) && val.length !== void 0;
|
|
231
|
+
});
|
|
232
|
+
inst._zod.onattach.push((inst2) => {
|
|
233
|
+
const bag = inst2._zod.bag;
|
|
234
|
+
bag.minimum = def.length;
|
|
235
|
+
bag.maximum = def.length;
|
|
236
|
+
bag.length = def.length;
|
|
237
|
+
});
|
|
238
|
+
inst._zod.check = (payload) => {
|
|
239
|
+
const input = payload.value;
|
|
240
|
+
const length = input.length;
|
|
241
|
+
if (length === def.length)
|
|
242
|
+
return;
|
|
243
|
+
const origin = getLengthableOrigin(input);
|
|
244
|
+
const tooBig = length > def.length;
|
|
245
|
+
payload.issues.push({
|
|
246
|
+
origin,
|
|
247
|
+
...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
|
|
248
|
+
inclusive: true,
|
|
249
|
+
exact: true,
|
|
250
|
+
input: payload.value,
|
|
251
|
+
inst,
|
|
252
|
+
continue: !def.abort
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
});
|
|
256
|
+
const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
257
|
+
var _a, _b;
|
|
258
|
+
$ZodCheck.init(inst, def);
|
|
259
|
+
inst._zod.onattach.push((inst2) => {
|
|
260
|
+
const bag = inst2._zod.bag;
|
|
261
|
+
bag.format = def.format;
|
|
262
|
+
if (def.pattern) {
|
|
263
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
264
|
+
bag.patterns.add(def.pattern);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
if (def.pattern)
|
|
268
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
269
|
+
def.pattern.lastIndex = 0;
|
|
270
|
+
if (def.pattern.test(payload.value))
|
|
271
|
+
return;
|
|
272
|
+
payload.issues.push({
|
|
273
|
+
origin: "string",
|
|
274
|
+
code: "invalid_format",
|
|
275
|
+
format: def.format,
|
|
276
|
+
input: payload.value,
|
|
277
|
+
...def.pattern ? { pattern: def.pattern.toString() } : {},
|
|
278
|
+
inst,
|
|
279
|
+
continue: !def.abort
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
else
|
|
283
|
+
(_b = inst._zod).check ?? (_b.check = () => {
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
287
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
288
|
+
inst._zod.check = (payload) => {
|
|
289
|
+
def.pattern.lastIndex = 0;
|
|
290
|
+
if (def.pattern.test(payload.value))
|
|
291
|
+
return;
|
|
292
|
+
payload.issues.push({
|
|
293
|
+
origin: "string",
|
|
294
|
+
code: "invalid_format",
|
|
295
|
+
format: "regex",
|
|
296
|
+
input: payload.value,
|
|
297
|
+
pattern: def.pattern.toString(),
|
|
298
|
+
inst,
|
|
299
|
+
continue: !def.abort
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
});
|
|
303
|
+
const $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
|
|
304
|
+
def.pattern ?? (def.pattern = lowercase);
|
|
305
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
306
|
+
});
|
|
307
|
+
const $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
|
|
308
|
+
def.pattern ?? (def.pattern = uppercase);
|
|
309
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
310
|
+
});
|
|
311
|
+
const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
|
|
312
|
+
$ZodCheck.init(inst, def);
|
|
313
|
+
const escapedRegex = escapeRegex(def.includes);
|
|
314
|
+
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
|
|
315
|
+
def.pattern = pattern;
|
|
316
|
+
inst._zod.onattach.push((inst2) => {
|
|
317
|
+
const bag = inst2._zod.bag;
|
|
318
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
319
|
+
bag.patterns.add(pattern);
|
|
320
|
+
});
|
|
321
|
+
inst._zod.check = (payload) => {
|
|
322
|
+
if (payload.value.includes(def.includes, def.position))
|
|
323
|
+
return;
|
|
324
|
+
payload.issues.push({
|
|
325
|
+
origin: "string",
|
|
326
|
+
code: "invalid_format",
|
|
327
|
+
format: "includes",
|
|
328
|
+
includes: def.includes,
|
|
329
|
+
input: payload.value,
|
|
330
|
+
inst,
|
|
331
|
+
continue: !def.abort
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
});
|
|
335
|
+
const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
|
|
336
|
+
$ZodCheck.init(inst, def);
|
|
337
|
+
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
338
|
+
def.pattern ?? (def.pattern = pattern);
|
|
339
|
+
inst._zod.onattach.push((inst2) => {
|
|
340
|
+
const bag = inst2._zod.bag;
|
|
341
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
342
|
+
bag.patterns.add(pattern);
|
|
343
|
+
});
|
|
344
|
+
inst._zod.check = (payload) => {
|
|
345
|
+
if (payload.value.startsWith(def.prefix))
|
|
346
|
+
return;
|
|
347
|
+
payload.issues.push({
|
|
348
|
+
origin: "string",
|
|
349
|
+
code: "invalid_format",
|
|
350
|
+
format: "starts_with",
|
|
351
|
+
prefix: def.prefix,
|
|
352
|
+
input: payload.value,
|
|
353
|
+
inst,
|
|
354
|
+
continue: !def.abort
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
|
|
359
|
+
$ZodCheck.init(inst, def);
|
|
360
|
+
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
361
|
+
def.pattern ?? (def.pattern = pattern);
|
|
362
|
+
inst._zod.onattach.push((inst2) => {
|
|
363
|
+
const bag = inst2._zod.bag;
|
|
364
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
365
|
+
bag.patterns.add(pattern);
|
|
366
|
+
});
|
|
367
|
+
inst._zod.check = (payload) => {
|
|
368
|
+
if (payload.value.endsWith(def.suffix))
|
|
369
|
+
return;
|
|
370
|
+
payload.issues.push({
|
|
371
|
+
origin: "string",
|
|
372
|
+
code: "invalid_format",
|
|
373
|
+
format: "ends_with",
|
|
374
|
+
suffix: def.suffix,
|
|
375
|
+
input: payload.value,
|
|
376
|
+
inst,
|
|
377
|
+
continue: !def.abort
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
});
|
|
381
|
+
const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
382
|
+
$ZodCheck.init(inst, def);
|
|
383
|
+
inst._zod.check = (payload) => {
|
|
384
|
+
payload.value = def.tx(payload.value);
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
export {
|
|
388
|
+
$ZodCheck,
|
|
389
|
+
$ZodCheckEndsWith,
|
|
390
|
+
$ZodCheckGreaterThan,
|
|
391
|
+
$ZodCheckIncludes,
|
|
392
|
+
$ZodCheckLengthEquals,
|
|
393
|
+
$ZodCheckLessThan,
|
|
394
|
+
$ZodCheckLowerCase,
|
|
395
|
+
$ZodCheckMaxLength,
|
|
396
|
+
$ZodCheckMinLength,
|
|
397
|
+
$ZodCheckMultipleOf,
|
|
398
|
+
$ZodCheckNumberFormat,
|
|
399
|
+
$ZodCheckOverwrite,
|
|
400
|
+
$ZodCheckRegex,
|
|
401
|
+
$ZodCheckStartsWith,
|
|
402
|
+
$ZodCheckStringFormat,
|
|
403
|
+
$ZodCheckUpperCase
|
|
404
|
+
};
|
|
405
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.js","sources":["../../../../../../../../node_modules/zod/v4/core/checks.js"],"sourcesContent":["// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inst,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inst,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n"],"names":["core.$constructor","inst","util.floatSafeRemainder","util.NUMBER_FORMAT_RANGES","regexes.integer","util.nullish","util.getLengthableOrigin","regexes.lowercase","regexes.uppercase","util.escapeRegex"],"mappings":";;;AA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AI;AAAA,IAC3B,CAAS;AAAA,EACL;AACJ,CAAC;AAwCW,MAAC,qBAAmCD,6BAAkB,sBAAsB,CAAC,MAAM,QAAQ;AACnG,YAAU,KAAK,MAAM,GAAG;AACxB,OAAK,KAAK,QAAQ,CAAC,YAAY;AAC3B,YAAQ,QAAQ,IAAI,GAAG,QAAQ,KAAK;AAAA,EACxC;AACJ,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function $constructor(name, initializer, params) {
|
|
2
|
+
function init(inst, def) {
|
|
3
|
+
var _a;
|
|
4
|
+
Object.defineProperty(inst, "_zod", {
|
|
5
|
+
value: inst._zod ?? {},
|
|
6
|
+
enumerable: false
|
|
7
|
+
});
|
|
8
|
+
(_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
|
|
9
|
+
inst._zod.traits.add(name);
|
|
10
|
+
initializer(inst, def);
|
|
11
|
+
for (const k in _.prototype) {
|
|
12
|
+
if (!(k in inst))
|
|
13
|
+
Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
|
|
14
|
+
}
|
|
15
|
+
inst._zod.constr = _;
|
|
16
|
+
inst._zod.def = def;
|
|
17
|
+
}
|
|
18
|
+
const Parent = params?.Parent ?? Object;
|
|
19
|
+
class Definition extends Parent {
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(Definition, "name", { value: name });
|
|
22
|
+
function _(def) {
|
|
23
|
+
var _a;
|
|
24
|
+
const inst = params?.Parent ? new Definition() : this;
|
|
25
|
+
init(inst, def);
|
|
26
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
27
|
+
for (const fn of inst._zod.deferred) {
|
|
28
|
+
fn();
|
|
29
|
+
}
|
|
30
|
+
return inst;
|
|
31
|
+
}
|
|
32
|
+
Object.defineProperty(_, "init", { value: init });
|
|
33
|
+
Object.defineProperty(_, Symbol.hasInstance, {
|
|
34
|
+
value: (inst) => {
|
|
35
|
+
if (params?.Parent && inst instanceof params.Parent)
|
|
36
|
+
return true;
|
|
37
|
+
return inst?._zod?.traits?.has(name);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(_, "name", { value: name });
|
|
41
|
+
return _;
|
|
42
|
+
}
|
|
43
|
+
class $ZodAsyncError extends Error {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const globalConfig = {};
|
|
49
|
+
function config(newConfig) {
|
|
50
|
+
return globalConfig;
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
$ZodAsyncError,
|
|
54
|
+
$constructor,
|
|
55
|
+
config,
|
|
56
|
+
globalConfig
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../../../../../../../node_modules/zod/v4/core/core.js"],"sourcesContent":["/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n var _a;\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod ?? {},\n enumerable: false,\n });\n (_a = inst._zod).traits ?? (_a.traits = new Set());\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n for (const k in _.prototype) {\n if (!(k in inst))\n Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });\n }\n inst._zod.constr = _;\n inst._zod.def = def;\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n"],"names":[],"mappings":"AAIgC,SAAS,aAAa,MAAM,aAAa,QAAQ;AAC7E,WAAS,KAAK,MAAM,KAAK;AACrB,QAAI;AACJ,WAAO,eAAe,MAAM,QAAQ;AAAA,MAChC,OAAO,KAAK,QAAQ,CAAA;AAAA,MACpB,YAAY;AAAA,IACxB,CAAS;AACD,KAAC,KAAK,KAAK,MAAM,WAAW,GAAG,SAAS,oBAAI;AAC5C,SAAK,KAAK,OAAO,IAAI,IAAI;AACzB,gBAAY,MAAM,GAAG;AAErB,eAAW,KAAK,EAAE,WAAW;AACzB,UAAI,EAAE,KAAK;AACP,eAAO,eAAe,MAAM,GAAG,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,KAAK,IAAI,EAAC,CAAE;AAAA,IAC3E;AACA,SAAK,KAAK,SAAS;AACnB,SAAK,KAAK,MAAM;AAAA,EACpB;AAEA,QAAM,SAAS,QAAQ,UAAU;AAAA,EACjC,MAAM,mBAAmB,OAAO;AAAA,EACpC;AACI,SAAO,eAAe,YAAY,QAAQ,EAAE,OAAO,MAAM;AACzD,WAAS,EAAE,KAAK;AACZ,QAAI;AACJ,UAAM,OAAO,QAAQ,SAAS,IAAI,WAAU,IAAK;AACjD,SAAK,MAAM,GAAG;AACd,KAAC,KAAK,KAAK,MAAM,aAAa,GAAG,WAAW;AAC5C,eAAW,MAAM,KAAK,KAAK,UAAU;AACjC,SAAE;AAAA,IACN;AACA,WAAO;AAAA,EACX;AACA,SAAO,eAAe,GAAG,QAAQ,EAAE,OAAO,MAAM;AAChD,SAAO,eAAe,GAAG,OAAO,aAAa;AAAA,IACzC,OAAO,CAAC,SAAS;AACb,UAAI,QAAQ,UAAU,gBAAgB,OAAO;AACzC,eAAO;AACX,aAAO,MAAM,MAAM,QAAQ,IAAI,IAAI;AAAA,IACvC;AAAA,EACR,CAAK;AACD,SAAO,eAAe,GAAG,QAAQ,EAAE,OAAO,MAAM;AAChD,SAAO;AACX;AAGO,MAAM,uBAAuB,MAAM;AAAA,EACtC,cAAc;AACV,UAAM,0EAA0E;AAAA,EACpF;AACJ;AACY,MAAC,eAAe,CAAA;AACrB,SAAS,OAAO,WAAW;AAG9B,SAAO;AACX;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
class Doc {
|
|
2
|
+
constructor(args = []) {
|
|
3
|
+
this.content = [];
|
|
4
|
+
this.indent = 0;
|
|
5
|
+
if (this)
|
|
6
|
+
this.args = args;
|
|
7
|
+
}
|
|
8
|
+
indented(fn) {
|
|
9
|
+
this.indent += 1;
|
|
10
|
+
fn(this);
|
|
11
|
+
this.indent -= 1;
|
|
12
|
+
}
|
|
13
|
+
write(arg) {
|
|
14
|
+
if (typeof arg === "function") {
|
|
15
|
+
arg(this, { execution: "sync" });
|
|
16
|
+
arg(this, { execution: "async" });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const content = arg;
|
|
20
|
+
const lines = content.split("\n").filter((x) => x);
|
|
21
|
+
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
|
|
22
|
+
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
|
|
23
|
+
for (const line of dedented) {
|
|
24
|
+
this.content.push(line);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
compile() {
|
|
28
|
+
const F = Function;
|
|
29
|
+
const args = this?.args;
|
|
30
|
+
const content = this?.content ?? [``];
|
|
31
|
+
const lines = [...content.map((x) => ` ${x}`)];
|
|
32
|
+
return new F(...args, lines.join("\n"));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
Doc
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=doc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.js","sources":["../../../../../../../../node_modules/zod/v4/core/doc.js"],"sourcesContent":["export class Doc {\n constructor(args = []) {\n this.content = [];\n this.indent = 0;\n if (this)\n this.args = args;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const args = this?.args;\n const content = this?.content ?? [``];\n const lines = [...content.map((x) => ` ${x}`)];\n // console.log(lines.join(\"\\n\"));\n return new F(...args, lines.join(\"\\n\"));\n }\n}\n"],"names":[],"mappings":"AAAO,MAAM,IAAI;AAAA,EACb,YAAY,OAAO,IAAI;AACnB,SAAK,UAAU,CAAA;AACf,SAAK,SAAS;AACd,QAAI;AACA,WAAK,OAAO;AAAA,EACpB;AAAA,EACA,SAAS,IAAI;AACT,SAAK,UAAU;AACf,OAAG,IAAI;AACP,SAAK,UAAU;AAAA,EACnB;AAAA,EACA,MAAM,KAAK;AACP,QAAI,OAAO,QAAQ,YAAY;AAC3B,UAAI,MAAM,EAAE,WAAW,OAAM,CAAE;AAC/B,UAAI,MAAM,EAAE,WAAW,QAAO,CAAE;AAChC;AAAA,IACJ;AACA,UAAM,UAAU;AAChB,UAAM,QAAQ,QAAQ,MAAM,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;AACjD,UAAM,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,UAAS,EAAG,MAAM,CAAC;AAC/E,UAAM,WAAW,MAAM,IAAI,CAAC,MAAM,EAAE,MAAM,SAAS,CAAC,EAAE,IAAI,CAAC,MAAM,IAAI,OAAO,KAAK,SAAS,CAAC,IAAI,CAAC;AAChG,eAAW,QAAQ,UAAU;AACzB,WAAK,QAAQ,KAAK,IAAI;AAAA,IAC1B;AAAA,EACJ;AAAA,EACA,UAAU;AACN,UAAM,IAAI;AACV,UAAM,OAAO,MAAM;AACnB,UAAM,UAAU,MAAM,WAAW,CAAC,EAAE;AACpC,UAAM,QAAQ,CAAC,GAAG,QAAQ,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;AAE9C,WAAO,IAAI,EAAE,GAAG,MAAM,MAAM,KAAK,IAAI,CAAC;AAAA,EAC1C;AACJ;","x_google_ignoreList":[0]}
|