import { StyleFn } from "../../shared/src/color.mjs"; //#region src/cli/shared/logger.d.ts /** * Semantic style functions for inline text styling */ export declare const styles: { success: StyleFn; error: StyleFn; warning: StyleFn; info: StyleFn; create: StyleFn; update: StyleFn; delete: StyleFn; replace: StyleFn; unchanged: StyleFn; bold: StyleFn; dim: StyleFn; highlight: StyleFn; successBright: StyleFn; errorBright: StyleFn; resourceType: StyleFn; resourceName: StyleFn; path: StyleFn; value: StyleFn; placeholder: (text: string) => string; }; /** * Log output modes */ export type LogMode = "default" | "stream" | "plain"; export interface LogOptions { /** Output mode (default: "default") */ mode?: LogMode; /** Number of spaces to indent the entire line (default: 0) */ indent?: number; } /** Field transformer function. null excludes the field from table output. */ export type FieldTransformer = ((value: unknown, item: object) => string) | null; export interface OutOptions { /** Table display field transform/exclude settings. Only applied in table mode (not JSON). */ display?: Record; /** Show null values in table output (default: false) */ showNull?: boolean; } /** * The CLI logger. Diagnostics go to stderr; `out()` writes primary output to * stdout as a table, or as JSON when `jsonMode` is on. `--json` and * `--verbose` feed the `jsonMode` / `verbose` state, which CLI plugins share * with the SDK code paths they call. */ export declare const logger: { jsonMode: boolean; verbose: boolean; info(message: string, opts?: LogOptions): void; success(message: string, opts?: LogOptions): void; warn(message: string, opts?: LogOptions): void; error(message: string, opts?: LogOptions): void; log(message: string): void; newline(): void; debug(message: string): void; /** * Registers a value to be redacted from diagnostic log output (`info`/`success`/`warn`/ * `error`/`log`/`debug`). Any occurrence of `value` — or of its JSON-string-escaped form * (so a value embedded in `JSON.stringify`d output, e.g. `--json` mode error envelopes, is * also caught) or its `application/x-www-form-urlencoded` form (so a value that reached the * process via a URL query string, e.g. an OAuth authorization code decoded from a callback * URL via `URLSearchParams`, is still caught if that same URL — still encoded — is later * echoed into a diagnostic message) — is replaced with `` before it reaches * stderr. Does not affect `out()`, since some commands intentionally print secret values as * their primary result. * * Values shorter than 4 characters are ignored, since they are too likely to match * unrelated text. A non-string value (e.g. `undefined` from an unvalidated external * payload cast to a typed shape) is ignored the same way, rather than throwing, since a * logging call must never be what crashes the process. * @param value - The secret value to redact from future log output */ registerSecret(value: string): void; out(data: string | object | object[], options?: OutOptions): void; }; //#endregion