/** * Pure/sync helpers for editing the `.hublaunch/hublaunch.config.js` source * file as text. Kept side-effect free (no filesystem access) so the string * transformations are unit-testable in isolation — same rationale as * `appendGitignoreEntry` in `src/commands/init.ts`. Callers own reading and * writing the file. */ /** * Insert or replace the `provider` block in a config file's source text. * * Mirrors the comment-out-then-insert approach used by `saveApiKeyToConfig` in * `src/commands/login.ts` for `hulaApiKey`: * - Any existing `provider:` line — whether active or commented out (including * the placeholder init writes) — is commented out. * - The new active line is inserted immediately after the config opening * (`export const config = {` or `export default {`). * * The block is written on a SINGLE line (`provider: { type: '…', apiKey: '…' },`) * so the comment-out regex is robust — a multi-line object would leave dangling * inner lines. `init` emits the same single-line shape. * * If no config opening is found the content is returned unchanged (the caller * degrades gracefully rather than corrupting the file). Never echoes the key * anywhere but the returned string. */ export declare function upsertProviderApiKey(content: string, providerType: string, key: string): string; //# sourceMappingURL=config-file-edit.d.ts.map