import { type ScaffoldContext, type ScaffoldOptions } from '../types.js'; export interface FirebaseOptions extends ScaffoldOptions { skipFirebase?: boolean; /** Commander's `--no-auth` negation. */ auth?: boolean; } export interface FirebaseCredentials { projectId: string; apiKey: string; authDomain: string; storageBucket: string; messagingSenderId: string; appId: string; } /** * The two config values that are derivable from the project id. * * Offered as prompt defaults rather than assumed, because `storageBucket` * changed suffix: projects created before October 2024 use `.appspot.com`, and * silently writing the wrong one produces uploads that fail with a 404 much * later. Deriving-but-overridable is the honest middle. */ export declare function deriveFirebaseDefaults(projectId: string): { authDomain: string; storageBucket: string; }; /** Google enforces 6–30 characters, lowercase letters, digits and hyphens. */ export declare function isValidProjectId(value: string): boolean; /** The `.env.local` body, kept pure so the ordering is testable. */ export declare function envFileFor(credentials: FirebaseCredentials): string; /** * Rewrites `.firebaserc`'s default project. * * Pure so it can be unit-tested, like `patchSupabaseConfigText`. Unlike the * Supabase config patch this cannot run as a scaffold patch: those execute * before the backend step, and the Firebase project id is only known once the * user has been prompted for it. */ export declare function patchFirebaseRcText(content: string, projectId: string): string; /** * Collects the web config, writes `.env.local` and `.firebaserc`, and drives * firebase-tools when it is available. * * Every part of this degrades. A user who skips the prompts, or has no * firebase-tools, still ends up with a working project and the exact commands * they need. */ export declare function connectFirebase(ctx: ScaffoldContext): Promise;