prisma-zod-generator
Version:
Prisma 2+ generator to emit Zod schemas from your Prisma schema
27 lines (26 loc) • 964 B
TypeScript
/**
* PZG Pro Data Seeding & Factories
*
* Generate type-safe data builders and fixtures from Zod schemas
* Deterministic seeds per schema version for consistent testing
*/
export interface DataFactoriesConfig {
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;
}>;
generateFixtures?: boolean;
generateFactories?: boolean;
generateSeeders?: boolean;
fixtureSize?: 'small' | 'medium' | 'large';
locale?: string;
enableRelations?: boolean;
seedStrategy?: 'random' | 'deterministic' | 'realistic';
customProviders?: Record<string, unknown>;
}
export declare function generateDataFactories(schemaPath: string, config?: DataFactoriesConfig): Promise<void>;