/** * The normalized credentials the CLI connects with. `host` is the bare address {@link ProtectClient.connect} expects (no scheme, port preserved) - we accept the * documented `controller` form in the file (which may carry an `https://` scheme) and normalize it here, so the connect path never has to think about schemes. * * @category CLI */ export interface UfpCredentials { host: string; password: string; username: string; } /** * Options for {@link loadCredentials}. The defaults read the real working directory and home directory; tests override them to point at a temporary fixture without * touching the developer's real `~/.ufp.json`. * * @category CLI */ export interface LoadCredentialsOptions { cwd?: string; home?: string; } /** * Locate, parse, validate, and normalize the CLI credentials. The discovery order is `./ufp.json` in the working directory first, then `~/.ufp.json` in the * home directory. The first file that exists wins; a malformed or incomplete file is a hard error (we do not silently fall through to the next location, because a * present-but-broken file is a mistake the operator wants told about, not masked). * * @param opts - Optional working-directory and home-directory overrides (defaults to the real ones). * * @returns The normalized credentials. * * @throws {@link CliError} when no configuration is found, or when the one found is unreadable, malformed, or missing a field. * * @category CLI */ export declare function loadCredentials(opts?: LoadCredentialsOptions): Promise; //# sourceMappingURL=credentials.d.ts.map