@next-boilerplate/cli-helpers
Version:
CLI helper for Next Boilerplate
67 lines (64 loc) • 1.61 kB
text/typescript
import { z } from 'zod';
declare const pluginsFolder = "plugins";
declare const pluginConfigFileName = "config.json";
/**
* Schema for validating plugin used in configuration file.
*/
declare const pluginSchema: z.ZodObject<{
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">;
}, "strip", z.ZodTypeAny, {
name: string;
paths: {
from: string;
to: string;
}[];
}, {
name: string;
paths: {
from: string;
to: string;
}[];
}>;
/**
* Schema for validating the configuration of a plugin.
*/
declare const pluginConfigSchema: z.ZodObject<{
name: z.ZodString;
description: 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">;
}, "strip", z.ZodTypeAny, {
name: string;
paths: {
from: string;
to: string;
}[];
description: string;
}, {
name: string;
paths: {
from: string;
to: string;
}[];
description: string;
}>;
type TPluginConfig = z.infer<typeof pluginConfigSchema>;
export { type TPluginConfig, pluginConfigFileName, pluginConfigSchema, pluginSchema, pluginsFolder };