UNPKG

@code-pushup/models

Version:

Model definitions and validators for the Code PushUp CLI

28 lines 925 B
import { z } from 'zod'; export const cacheConfigObjectSchema = z .object({ read: z .boolean() .meta({ description: 'Whether to read from cache if available' }) .default(false), write: z .boolean() .meta({ description: 'Whether to write results to cache' }) .default(false), }) .meta({ title: 'CacheConfigObject', description: 'Cache configuration object for read and/or write operations', }); export const cacheConfigShorthandSchema = z.boolean().meta({ title: 'CacheConfigShorthand', description: 'Cache configuration shorthand for both, read and write operations', }); export const cacheConfigSchema = z .union([cacheConfigShorthandSchema, cacheConfigObjectSchema]) .meta({ title: 'CacheConfig', description: 'Cache configuration for read and write operations', }) .default(false); //# sourceMappingURL=cache-config.js.map