import { z } from "zod"; import { type GeneratedFile, type ScaffoldConfig } from "./scaffold-config.js"; /** * Marker file written into every scaffolded project. It records the scaffold * configuration and a hash of every generated file so `create-ts-lib update` * can re-render templates later and tell user-modified files apart from * files that are safe to re-sync. */ export declare const stateFileName = ".create-ts-lib.json"; export declare const packageManagerSchema: z.ZodEnum<{ npm: "npm"; pnpm: "pnpm"; yarn: "yarn"; }>; export declare const licenseNameSchema: z.ZodEnum<{ "Apache-2.0": "Apache-2.0"; ISC: "ISC"; MIT: "MIT"; UNLICENSED: "UNLICENSED"; }>; export declare const bundlerSchema: z.ZodEnum<{ tsc: "tsc"; tsdown: "tsdown"; }>; export declare const scaffoldConfigSchema: z.ZodObject<{ author: z.ZodString; bundler: z.ZodEnum<{ tsc: "tsc"; tsdown: "tsdown"; }>; copyrightYear: z.ZodDefault; description: z.ZodString; githubRepoUrl: z.ZodString; includeCli: z.ZodBoolean; includeCodecov: z.ZodBoolean; includeCommunityFiles: z.ZodDefault; includeJsr: z.ZodBoolean; includeSecurityWorkflows: z.ZodBoolean; includeZod: z.ZodBoolean; license: z.ZodEnum<{ "Apache-2.0": "Apache-2.0"; ISC: "ISC"; MIT: "MIT"; UNLICENSED: "UNLICENSED"; }>; lintFormatTooling: z.ZodEnum<{ biome: "biome"; "oxlint-oxfmt": "oxlint-oxfmt"; }>; nodeTarget: z.ZodDefault>; packageManager: z.ZodEnum<{ npm: "npm"; pnpm: "pnpm"; yarn: "yarn"; }>; projectName: z.ZodString; workspaceMode: z.ZodDefault; }, z.core.$strip>; export declare const scaffoldStateSchema: z.ZodObject<{ config: z.ZodObject<{ author: z.ZodString; bundler: z.ZodEnum<{ tsc: "tsc"; tsdown: "tsdown"; }>; copyrightYear: z.ZodDefault; description: z.ZodString; githubRepoUrl: z.ZodString; includeCli: z.ZodBoolean; includeCodecov: z.ZodBoolean; includeCommunityFiles: z.ZodDefault; includeJsr: z.ZodBoolean; includeSecurityWorkflows: z.ZodBoolean; includeZod: z.ZodBoolean; license: z.ZodEnum<{ "Apache-2.0": "Apache-2.0"; ISC: "ISC"; MIT: "MIT"; UNLICENSED: "UNLICENSED"; }>; lintFormatTooling: z.ZodEnum<{ biome: "biome"; "oxlint-oxfmt": "oxlint-oxfmt"; }>; nodeTarget: z.ZodDefault>; packageManager: z.ZodEnum<{ npm: "npm"; pnpm: "pnpm"; yarn: "yarn"; }>; projectName: z.ZodString; workspaceMode: z.ZodDefault; }, z.core.$strip>; files: z.ZodRecord; generator: z.ZodString; version: z.ZodString; }, z.core.$strip>; export type ScaffoldState = z.infer; /** * Guards the public entry points, which JavaScript callers can reach with any * object at all. Without it a bad `packageManager` surfaces as a TypeError from * a lookup table several frames later instead of a message naming the field. * * Returns the parsed config rather than merely asserting, because the fields * carrying a static `.default()` -- present for state-file compatibility -- * make a partial object *validate* while still being partial. Rendering the * caller's object then wrote `Copyright (c) undefined` into LICENSE and * recorded its hash as gospel, since `renderTemplate` substitutes through a * replacer function and so never sees an unresolved placeholder to complain * about. */ export declare const parseScaffoldConfig: (config: ScaffoldConfig) => ScaffoldConfig; export declare const hashFileContent: (content: string) => string; export declare const buildStateFile: (config: ScaffoldConfig, files: GeneratedFile[]) => GeneratedFile; //# sourceMappingURL=state.d.ts.map