import { LoadConfigResult } from '@scaffdog/config'; export { LoadConfigResult } from '@scaffdog/config'; import { Context, VariableRecord, ResolvedConfig } from '@scaffdog/types'; export { Config, Context, ResolvedConfig, Variable, VariableRecord } from '@scaffdog/types'; import { Template, VariableSourceMap } from '@scaffdog/core'; import * as z from 'zod'; export { ScaffdogAggregateError, ScaffdogError } from '@scaffdog/error'; type File = { skip: boolean; path: string; name: string; content: string; }; type RawQuestionCheckbox = z.infer; declare const rawQuestionCheckboxSchema: z.ZodObject<{ message: z.ZodString; choices: z.ZodArray; multiple: z.ZodOptional; initial: z.ZodOptional>; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string[] | undefined; if?: string | boolean | undefined; }, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string[] | undefined; if?: string | boolean | undefined; }>; type RawQuestionList = z.infer; declare const rawQuestionListSchema: z.ZodObject<{ message: z.ZodString; choices: z.ZodArray; multiple: z.ZodOptional; initial: z.ZodOptional; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string | undefined; if?: string | boolean | undefined; }, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string | undefined; if?: string | boolean | undefined; }>; type RawQuestionConfirm = z.infer; declare const rawQuestionConfirmSchema: z.ZodObject<{ confirm: z.ZodString; initial: z.ZodOptional; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { confirm: string; initial?: boolean | undefined; if?: string | boolean | undefined; }, { confirm: string; initial?: boolean | undefined; if?: string | boolean | undefined; }>; type RawQuestionInput = z.infer; declare const rawQuestionInputSchema: z.ZodObject<{ message: z.ZodString; initial: z.ZodOptional; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { message: string; initial?: string | undefined; if?: string | boolean | undefined; }, { message: string; initial?: string | undefined; if?: string | boolean | undefined; }>; type QuestionCheckbox = Omit & { type: 'checkbox'; }; type QuestionList = Omit & { type: 'list'; }; type QuestionConfirm = Omit & { type: 'confirm'; message: string; }; type QuestionInput = RawQuestionInput & { type: 'input'; }; type Question = QuestionCheckbox | QuestionList | QuestionConfirm | QuestionInput; type QuestionMap = Map; type RawDocumentAttributes = z.infer; declare const rawAttrSchema: z.ZodObject<{ name: z.ZodString; root: z.ZodString; output: z.ZodUnion<[z.ZodString, z.ZodArray]>; ignore: z.ZodOptional>; questions: z.ZodOptional; multiple: z.ZodOptional; initial: z.ZodOptional>; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string[] | undefined; if?: string | boolean | undefined; }, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string[] | undefined; if?: string | boolean | undefined; }>, z.ZodObject<{ message: z.ZodString; choices: z.ZodArray; multiple: z.ZodOptional; initial: z.ZodOptional; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string | undefined; if?: string | boolean | undefined; }, { message: string; choices: string[]; multiple?: boolean | undefined; initial?: string | undefined; if?: string | boolean | undefined; }>, z.ZodObject<{ confirm: z.ZodString; initial: z.ZodOptional; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { confirm: string; initial?: boolean | undefined; if?: string | boolean | undefined; }, { confirm: string; initial?: boolean | undefined; if?: string | boolean | undefined; }>, z.ZodObject<{ message: z.ZodString; initial: z.ZodOptional; if: z.ZodOptional>; }, "strict", z.ZodTypeAny, { message: string; initial?: string | undefined; if?: string | boolean | undefined; }, { message: string; initial?: string | undefined; if?: string | boolean | undefined; }>]>]>>>; }, "strip", z.ZodTypeAny, { name: string; output: (string | string[]) & (string | string[] | undefined); root: string; ignore?: string[] | undefined; questions?: Record | undefined; }, { name: string; output: (string | string[]) & (string | string[] | undefined); root: string; ignore?: string[] | undefined; questions?: Record | undefined; }>; type DocumentAttributes = Omit & { questions: QuestionMap; }; type Document = DocumentAttributes & { path: string; templates: Template[]; variables: VariableSourceMap; }; /** * Public API */ type GenerateInputsResolver = (context: Context) => Promise; type GenerateInputs = VariableRecord | GenerateInputsResolver; type GenerateOptions = { inputs?: GenerateInputs; }; type Scaffdog = { path: { project: string; config: string; }; config: ResolvedConfig; list: () => Promise; generate: (document: Document, output: string, options?: GenerateOptions) => Promise; }; /** * createScaffdog */ type ScaffdogFactoryOptions = LoadConfigResult & Partial<{ cwd: string; }>; type ScaffdogFactory = (options: ScaffdogFactoryOptions) => Scaffdog; /** * loadScaffdog */ type ScaffdogLoaderOptions = { cwd: string; }; type ScaffdogLoader = (path: string, options?: Partial) => Promise; declare const version: string; declare const createScaffdog: ScaffdogFactory; declare const loadScaffdog: ScaffdogLoader; export { Document, DocumentAttributes, File, GenerateInputs, GenerateInputsResolver, GenerateOptions, Question, QuestionCheckbox, QuestionConfirm, QuestionInput, QuestionList, QuestionMap, Scaffdog, ScaffdogFactory, ScaffdogFactoryOptions, ScaffdogLoader, ScaffdogLoaderOptions, createScaffdog, loadScaffdog, version };