UNPKG

@next-boilerplate/cli-helpers

Version:
193 lines (190 loc) 4.64 kB
import { z } from 'zod'; /** * Schema for validating the configuration of the application. * It includes the name of the application, an array of plugins, and an array of stores. */ declare const configSchema: z.ZodObject<{ name: z.ZodString; plugins: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{ name: z.ZodString; paths: z.ZodArray<z.ZodObject<{ from: z.ZodEffects<z.ZodString, string, string>; to: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { from: string; to: string; }, { from: string; to: string; }>, "many">; }, { store: z.ZodObject<{ name: z.ZodString; version: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; version: string; }, { name: string; version: string; }>; }>, "strip", z.ZodTypeAny, { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }, { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }>, "many">; stores: z.ZodArray<z.ZodObject<{ name: z.ZodString; version: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; version: string; }, { name: string; version: string; }>, "many">; }, "strip", z.ZodTypeAny, { name: string; plugins: { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }[]; stores: { name: string; version: string; }[]; }, { name: string; plugins: { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }[]; stores: { name: string; version: string; }[]; }>; type TConfig = z.infer<typeof configSchema>; declare const optionalConfigSchema: z.ZodObject<{ name: z.ZodOptional<z.ZodString>; plugins: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{ name: z.ZodString; paths: z.ZodArray<z.ZodObject<{ from: z.ZodEffects<z.ZodString, string, string>; to: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { from: string; to: string; }, { from: string; to: string; }>, "many">; }, { store: z.ZodObject<{ name: z.ZodString; version: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; version: string; }, { name: string; version: string; }>; }>, "strip", z.ZodTypeAny, { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }, { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }>, "many">>; stores: z.ZodOptional<z.ZodArray<z.ZodObject<{ name: z.ZodString; version: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; version: string; }, { name: string; version: string; }>, "many">>; }, "strip", z.ZodTypeAny, { name?: string | undefined; plugins?: { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }[] | undefined; stores?: { name: string; version: string; }[] | undefined; }, { name?: string | undefined; plugins?: { name: string; paths: { from: string; to: string; }[]; store: { name: string; version: string; }; }[] | undefined; stores?: { name: string; version: string; }[] | undefined; }>; type TOptionalConfig = z.infer<typeof optionalConfigSchema>; export { type TConfig, type TOptionalConfig, configSchema, optionalConfigSchema };