shadcn-vue/apps/www/src/lib/registry/schema.ts
2023-09-05 23:45:14 +08:00

18 lines
411 B
TypeScript

import * as z from 'zod'
export const registrySchema = z.array(
z.object({
name: z.string(),
dependencies: z.array(z.string()).optional(),
registryDependencies: z.array(z.string()).optional(),
files: z.array(z.string()),
type: z.enum([
'components:ui',
'components:component',
'components:example',
]),
}),
)
export type Registry = z.infer<typeof registrySchema>