UNPKG

@baseplate-dev/sync

Version:

Library for syncing Baseplate descriptions

117 lines 4.23 kB
import { z } from 'zod'; /** * Schema for a single template configuration in the extractor.json file */ export declare const templateConfigSchema: z.ZodObject<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, z.ZodTypeAny, "passthrough">>; /** * Main schema for extractor.json configuration */ export declare const extractorConfigSchema: z.ZodObject<{ /** * Name of the generator, e.g. auth/auth-module */ name: z.ZodString; /** * Template map keyed by template name */ templates: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, z.ZodTypeAny, "passthrough">>>>; /** * Configuration for each extractor keyed by extractor type */ extractors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>; /** * Plugin-specific configuration keyed by plugin name */ plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>; }, "strip", z.ZodTypeAny, { name: string; templates: Record<string, z.objectOutputType<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, z.ZodTypeAny, "passthrough">>; extractors?: Record<string, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">> | undefined; plugins?: Record<string, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">> | undefined; }, { name: string; templates?: Record<string, z.objectInputType<{ /** * Source file path relative to templates directory */ sourceFile: z.ZodString; /** * Type of the template. For example, it can be `ts` for typescript templates. */ type: z.ZodString; }, z.ZodTypeAny, "passthrough">> | undefined; extractors?: Record<string, z.objectInputType<{}, z.ZodTypeAny, "passthrough">> | undefined; plugins?: Record<string, z.objectInputType<{}, z.ZodTypeAny, "passthrough">> | undefined; }>; /** * Type for a single template configuration */ export type TemplateConfig = z.infer<typeof templateConfigSchema>; /** * Type for extractor configuration */ export type ExtractorConfig = z.infer<typeof extractorConfigSchema>; //# sourceMappingURL=extractor-config.schema.d.ts.map