UNPKG

repomix

Version:

A tool to pack repository contents to single file for AI consumption

38 lines 1.46 kB
import readline from 'node:readline/promises'; import type { Readable } from 'node:stream'; export interface StdinFileResult { filePaths: string[]; emptyDirPaths: string[]; } export interface StdinDependencies { stdin: NodeJS.ReadableStream & { isTTY?: boolean; }; createReadlineInterface: (options: { input: Readable; }) => readline.Interface; } /** * Filters and validates lines from stdin input. * Removes empty lines and comments (lines starting with #). */ export declare const filterValidLines: (lines: string[]) => string[]; /** * Resolves relative paths to absolute paths and deduplicates them. */ export declare const resolveAndDeduplicatePaths: (lines: string[], cwd: string) => string[]; /** * Reads lines from a readable stream using readline interface. * Waits for EOF before returning all collected lines. * Handles interactive tools like fzf that may take time to provide output. */ export declare const readLinesFromStream: (input: Readable, createInterface?: (options: { input: Readable; }) => readline.Interface) => Promise<string[]>; /** * Reads file paths from stdin, one per line. * Filters out empty lines and comments (lines starting with #). * Converts relative paths to absolute paths based on the current working directory. */ export declare const readFilePathsFromStdin: (cwd: string, deps?: StdinDependencies) => Promise<StdinFileResult>; //# sourceMappingURL=fileStdin.d.ts.map