import type { ReplaceTuples } from "./replace.js"; import type { TransformMode } from "./transforms/mode.js"; export type Config = { /** * The input directory to gather file paths from. * @default "src" */ input?: string; /** * The output directory for the package export files. * @default "dist" */ output?: string; /** * A list of globs to include file paths from. * @default ["**\/*.{ts,tsx,cts,mts,js,jsx,mjs,cjs,css}"] */ include?: string[]; /** * A list of globs to exclude file paths from. * @default ["**\/*.d.ts", "**\/*.test.*", "**\/*.spec.*", "**\/__tests__/**"] */ exclude?: string[]; /** * The mode to transform filepath segments. * - `"passthrough"` - No transformation (default) * - `"camelCase"` - Transform to camelCase * - `"kebab-case"` - Transform to kebab-case * - `"PascalCase"` - Transform to PascalCase * - `"snake_case"` - Transform to snake_case * @default "passthrough" */ mode?: TransformMode; /** * Add a unique custom condition to the package.json exports for supporting live types in a monorepo. * Example: "@my-package/source" * @see https://colinhacks.com/essays/live-types-typescript-monorepo * @default undefined */ customCondition?: string | null; /** * Replace export keys, a way to rename exports. * Array of tuples: [pattern, replacement] * Pattern can be a string or RegExp. * @example [["/_pb/", ""]] // Remove _pb suffix from protobuf files * @default [] */ replace?: ReplaceTuples; /** * When true, emit plain string entries pointing directly to source files, * omitting `import`, `types`, and any custom condition from the exports map. * @default false */ sourceOnly?: boolean; }; /** * Load config from gen-x.config.{ts,js,mjs,cjs,json} or package.json#genx * Priority: gen-x.config.* > package.json#genx */ export declare function loadConfig(cwd?: string): Promise; /** * Merge configs with priority: cli > config file > defaults */ export declare function mergeConfigs(cliConfig: Config, fileConfig: Config | null, defaults: Config): Config; /** * Type-safe helper for defining gen-x configuration. * Use in gen-x.config.ts or gen-x.config.js files. * * @example * ```ts * import { defineConfig } from "@ngrok/gen-x"; * * export default defineConfig({ * mode: "camelCase", * customCondition: "@my-package/source" * }); * ``` */ export declare function defineConfig(config: Config): Config;