/** * Source edits that more than one init step needs to make. * * Inserting an import looks trivial until the file is in CRLF: a raw `\n` * produces mixed endings, makes git mark the whole file as changed, and — when * the expression that finds the imports forgets the `\r` — welds the new line * onto the end of the previous one. */ /** The line ending the file already uses. */ export declare function lineEndingOf(content: string): string; /** * Inserts an import line just after the file's last import. * * Returns the content untouched when the import is already there, so calling it * twice is the same as calling it once. */ export declare function withImport(content: string, importLine: string): string; /** Where an array literal starts and ends, as indices into the content. */ export interface ArrayRange { /** Index of the opening `[`. */ readonly open: number; /** Index of the closing `]`. */ readonly close: number; /** What sits between the two, without the brackets. */ readonly body: string; } /** * The range of the array assigned to `key`, found by counting brackets. * * A regular expression stops at the first `]` it sees, and in real code that `]` * is usually a nested array's — `withInterceptors([...])` inside `providers`, a * plugin with options inside `plugins`. Anything inserted there landed in the * wrong array, and the build broke with a type error that mentions ZardUI * nowhere. * * Strings and comments are skipped, so a `]` written inside one does not count * as a closing bracket. */ export declare function arrayRange(content: string, key: string): ArrayRange | null; //# sourceMappingURL=source-file.d.ts.map