import { Buffer } from 'node:buffer'; import { createReadStream } from 'node:fs'; import type { ClarityConfig, EncryptionConfig, Formatter, LoggerOptions, LogLevel, RotationConfig } from './types'; export declare const logger: Logger; declare interface FingersCrossedConfig { activationLevel: LogLevel bufferSize: number flushOnDeactivation: boolean stopBuffering: boolean } declare interface TagFormat { prefix?: string suffix?: string } declare interface ExtendedLoggerOptions extends LoggerOptions { formatter?: Formatter fingersCrossedEnabled?: boolean fingersCrossed?: Partial enabled?: boolean fancy?: boolean showTags?: boolean showIcons?: boolean tagFormat?: TagFormat timestampPosition?: 'left' | 'right' environment?: string } // Define missing types declare type BunTimer = ReturnType; export declare class Logger { readonly config: ClarityConfig; readonly options: ExtendedLoggerOptions; readonly formatter: Formatter; readonly timers: Set; readonly subLoggers: Set; readonly fingersCrossedBuffer: string[]; readonly ANSI_PATTERN: RegExp; constructor(name: string, options?: Partial); generateLogFilename(): string; setupRotation(): void; setupKeyRotation(): void; rotateKeys(): Promise; compressData(data: Buffer): Promise; getEncryptionOptions(): EncryptionConfig; handleFingersCrossedBuffer(level: LogLevel, formattedEntry: string): Promise; flushPendingWrites(): Promise; destroy(): Promise; getCurrentLogFilePath(): string; progress(total: number, initialMessage?: string): { update: (current: number, message?: string) => void finish: (message?: string) => void interrupt: (message: string, level?: LogLevel) => void }; time(label: string): (metadata?: Record) => Promise; debug(message: string): Promise; debug(message: string, ...args: any[]): Promise; debug(message: string, ...args: any[]): Promise; info(message: string): Promise; info(message: string, ...args: any[]): Promise; info(message: string, ...args: any[]): Promise; success(message: string): Promise; success(message: string, ...args: any[]): Promise; success(message: string, ...args: any[]): Promise; warn(message: string): Promise; warn(message: string, ...args: any[]): Promise; warn(message: string, ...args: any[]): Promise; error(message: string | Error): Promise; error(message: string | Error, ...args: any[]): Promise; error(message: string | Error, ...args: any[]): Promise; only(fn: () => T | Promise): Promise; isEnabled(): boolean; setEnabled(enabled: boolean): void; extend(namespace: string): Logger; createReadStream(): NodeJS.ReadableStream; decrypt(data: string | Buffer): Promise; getLevel(): LogLevel; getLogDirectory(): string; getFormat(): string | undefined; getRotationConfig(): RotationConfig | boolean | undefined; isBrowserMode(): boolean; isServerMode(): boolean; setTestEncryptionKey(keyId: string, key: Buffer): void; getTestCurrentKey(): { id: string, key: Buffer } | null; getConfig(): ClarityConfig; box(message: string): Promise; prompt(message: string): Promise; setFancy(enabled: boolean): void; isFancy(): boolean; pause(): void; resume(): void; start(message: string): Promise; start(message: string, ...args: any[]): Promise; start(message: string, ...args: any[]): Promise; clear(filters?: { name?: string, before?: Date }): Promise; } export default Logger;