type MigrationContext = { /** Path of the config file being migrated. */ configFilePath?: string; /** Directory the CLI was run from. Defaults to `process.cwd()`. */ cwd?: string; }; type Automigrate = { name: string; check: (config: string) => boolean; message: string; yes: (config: string, context?: MigrationContext) => string; no: (config: string) => string; }; /** Where `tokens build` saved CSS and type declarations by default, relative to where the CLI was run from. */ export declare const legacyBuildDir = "design-tokens-build"; /** * Builds an `output` equivalent to the deprecated `outDir` and `clean` fields. * Always includes a `design-tokens` output, also for the default directory: the deprecated fields * created design tokens, and the default `output` doesn't. * * `clean` only cleaned the design tokens directory, and defaulted to `false` like `cleanDir`. So `clean: true` is * carried over as `cleanDir: true` on the `design-tokens` output. `tokens build` didn't clean by default either, so * CSS and types use the default. * * Design tokens are saved in `outDir`, and CSS and types in `buildDir`, where `tokens build` saved them, so existing * design tokens and imports of the built files keep working. Their default directories are different, so `dir` is * always set. */ export declare const toOutput: (outDir: string | undefined, { clean, buildDir }?: { clean?: boolean; buildDir?: string; }) => ({ cleanDir: boolean; type: "design-tokens"; dir: string; } | { cleanDir?: undefined; type: "design-tokens"; dir: string; } | { cleanDir: boolean; tokensDir?: string | undefined; type: "css"; dir: string; } | { cleanDir?: undefined; tokensDir?: string | undefined; type: "css"; dir: string; } | { cleanDir: boolean; tokensDir?: string | undefined; type: "types"; dir: string; } | { cleanDir?: undefined; tokensDir?: string | undefined; type: "types"; dir: string; })[]; /** * `outDir` was resolved from the directory the CLI was run from, while `output` paths are resolved from the * config file's directory. Rewrites `outDir` so it points to the same directory when resolved from the config file. * Paths always use forward slashes, so the config works on any OS. */ export declare const toConfigRelative: (outDir: string, { configFilePath, cwd }: MigrationContext) => string; export declare const migrateToOutputField: (config: string, context?: MigrationContext) => string; declare const migration: Automigrate; export { migration as default };