/** * OAuth authentication flow for registry login. * Opens browser for GitHub authentication, prompts user for code, * decodes JWT token to extract user info. */ export interface OAuthResult { token: string; username: string; orgs: string[]; email: string | null; expiresAt: string | null; } declare class OAuthError extends Error { constructor(message: string); } /** * Exact prompt string the user sees when login is awaiting the OAuth code. * Exported so smoke tests can wait for it on stderr without duplicating the * literal — keeps the test from silently breaking if the copy is reworded. */ export declare const LOGIN_CODE_PROMPT = "Enter the code from your browser: "; /** * Prompt the user for input via the given readable stream (default: process.stdin). * Exported for tests; production callers omit `input` and get process.stdin. */ export declare function prompt(question: string, input?: NodeJS.ReadableStream): Promise; /** * Run the OAuth flow using copy/paste method. * Opens a browser for GitHub authentication. The registry displays a code * that the user copies and pastes back into the CLI. */ declare function runOAuthFlow(registryUrl: string): Promise; export { OAuthError, runOAuthFlow }; //# sourceMappingURL=oauth.d.ts.map