/// <reference types="node" />
import { exec as execCallback } from 'child_process';
export declare const exec: typeof execCallback.__promisify__;
/**
 * Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
 * @param dir The directory to search.
 * @returns Array of story file paths.
 */
export declare const getStoryFiles: (dir: string) => string[];
/**
 * Detects which internal packages are used in the provided story files.
 * It looks at every import that starts with the given package alias prefix,
 * then extracts the package name (the segment immediately following the prefix).
 *
 * @param stories Array of story file paths.
 * @returns Array of unique package names (e.g. ['foo', 'bar']).
 */
export declare const detectUsedPackages: (stories: string[]) => string[];
/**
 * Extracts all import paths from a file using the TypeScript compiler API.
 * @param filePath The file path to parse.
 * @returns Array of import strings.
 */
export declare const extractImports: (filePath: string) => string[];
/**
 * Parses the tsconfig paths and resolves them to absolute paths.
 * @param tsconfigPath The path to the tsconfig file.
 * @returns An object mapping alias keys to absolute paths.
 */
export declare const parseTsConfig: () => Record<string, string> | null;
/**
 * Filters the parsed tsconfig alias mapping to only include keys that correspond
 * to the used packages.
 *
 * @param parsedPaths The full alias mapping from tsconfig.
 * @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
 * @returns Filtered alias mapping.
 */
export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
