UNPKG

prisma-zod-generator

Version:

Prisma 2+ generator to emit Zod schemas from your Prisma schema

29 lines (28 loc) 977 B
/** * PZG Pro Zod Performance Pack * * Generate ultra-fast precompiled validators for hot paths * AST-based optimizations and streaming validation for large datasets */ export interface PerformancePackConfig { outputPath?: string; /** * Per-model settings, in the same shape the core generator uses. This pack parses * the schema itself rather than going through ProFeatureBase.getEnabledModels(), * so it has to apply the exclusion directly. */ models?: Record<string, { enabled?: boolean; }>; hotPaths?: string[]; enableStreaming?: boolean; enablePrecompilation?: boolean; enableBatching?: boolean; optimizationLevel?: 'basic' | 'aggressive' | 'extreme'; generateBenchmarks?: boolean; targetSize?: 'small' | 'medium' | 'large'; } /** * Generate high-performance Zod validators */ export declare function generatePerformancePack(schemaPath: string, config?: PerformancePackConfig): Promise<void>;