UNPKG

prisma-zod-generator

Version:

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

36 lines (35 loc) 1.22 kB
/** * PZG Pro - Contract Drift Guard * * CI checks to prevent breaking schema changes */ import { DMMF } from '@prisma/generator-helper'; import { GeneratorConfig } from '../../../config/parser'; import { DriftGuardConfig, SchemaChange } from './DriftGuardGenerator'; export { DriftGuardConfig, SchemaChange } from './DriftGuardGenerator'; /** * Validate schema drift using DMMF data */ export declare function validateDriftFromDMMF(baseDMMF: DMMF.Document, headDMMF: DMMF.Document, generatorConfig: GeneratorConfig, schemaPath: string, outputPath: string, prismaClientPath: string, provider: string, config?: DriftGuardConfig, previewFeatures?: string[]): Promise<{ success: boolean; changes: SchemaChange[]; output: string; }>; /** * Simple wrapper for demo scripts - validates drift using file paths */ export declare function validateDrift(config: { basePath: string; headPath: string; outputFormat?: 'github' | 'json' | 'text'; strictMode?: boolean; allowedBreaks?: string[]; }): Promise<{ success: boolean; changes: SchemaChange[]; output: string; }>; /** * CLI function for drift guard */ export declare function runDriftGuardCLI(args: string[]): Promise<void>;