import { type ExportsOptions } from './syncExports.js'; export type EntryRecord = Record; export interface GenerateEntriesOptions { /** * When `true`, compares the generated entries against `package.json` exports * and emits a `console.warn` if they are out of sync. * * Useful in `vite.config.ts` to catch forgotten `vite-magic generate` runs * at build/dev time. * * @default false */ warnOnExportsMismatch?: boolean; /** Follow symbolic links that remain inside `srcDir`. @default false */ followSymlinks?: boolean; /** Called for files and directories. Return `true` to exclude the path. */ exclude?: (relativePath: string) => boolean; /** Called for valid source files. Return `true` to include the file. */ include?: (relativePath: string) => boolean; /** How duplicate entry keys are handled. @default 'error' */ onCollision?: 'error' | 'overwrite'; /** Output contract used by `warnOnExportsMismatch`. */ exports?: Omit; } /** * Generates a tree-shakeable entry map for Vite `build.lib.entry`. * * Rules (applied per directory inside `srcDir`): * - `src/index.ts` → `{ index: '…/src/index.ts' }` * - `src/Users/index.ts` → `{ Users: '…/src/Users/index.ts' }` * - `src/Users/Users.tsx` → `{ 'Users/Users': '…/src/Users/Users.tsx' }` * - `src/Users/domain/user.ts` → `{ 'Users/domain/user': '…/src/Users/domain/user.ts' }` * * @param rootDir Absolute path to the project root (pass `__dirname` or * `fileURLToPath(new URL('.', import.meta.url))`) * @param srcDir Source directory name relative to `rootDir` (default: `'src'`) * @param options Optional configuration */ export declare function generateEntries(rootDir: string, srcDir?: string, options?: GenerateEntriesOptions): EntryRecord; //# sourceMappingURL=generateEntries.d.ts.map