@@ -726,6 +726,25 @@ export interface SpinnerOptions {
726726 /** Message to display when done, or false to hide, or true to keep original message */
727727 doneMessage ?: string | boolean ;
728728}
729+ /**
730+ * Options for log messages (info, warning, error)
731+ */
732+ export interface LogMessageOptions {
733+ /** Whether to add a trailing newline (default: true) */
734+ newline ?: boolean ;
735+ /** Apply bold formatting */
736+ bold ?: boolean ;
737+ /** Apply dim/gray formatting */
738+ dim ?: boolean ;
739+ /** Number of spaces to indent each line */
740+ indent ?: number ;
741+ /** Custom format function applied to each line */
742+ format ?: ( line : string ) => string ;
743+ /** Enable color formatting (default: true) */
744+ colorize ?: boolean ;
745+ /** Remove ANSI escape codes from output */
746+ stripAnsiCode ?: boolean ;
747+ }
729748/**
730749 * Render services available during check operations
731750 * Simplified version containing only what check operations need
@@ -1357,6 +1376,36 @@ export interface QuartoAPI {
13571376 * @param message - Message to display
13581377 */
13591378 completeMessage : ( message : string ) => void ;
1379+ /**
1380+ * Log an informational message to stderr
1381+ *
1382+ * Writes an info-level message to stderr using Quarto's custom logging handler.
1383+ * Supports formatting options like indentation, bold text, and color control.
1384+ *
1385+ * @param message - Message to log
1386+ * @param options - Optional formatting options
1387+ */
1388+ info : ( message : string , options ?: LogMessageOptions ) => void ;
1389+ /**
1390+ * Log a warning message to stderr
1391+ *
1392+ * Writes a warning-level message to stderr with yellow color and "WARNING:" prefix.
1393+ * Uses Quarto's custom logging handler.
1394+ *
1395+ * @param message - Warning message to log
1396+ * @param options - Optional formatting options
1397+ */
1398+ warning : ( message : string , options ?: LogMessageOptions ) => void ;
1399+ /**
1400+ * Log an error message to stderr
1401+ *
1402+ * Writes an error-level message to stderr with bright red color and "ERROR:" prefix.
1403+ * Uses Quarto's custom logging handler.
1404+ *
1405+ * @param message - Error message to log
1406+ * @param options - Optional formatting options
1407+ */
1408+ error : ( message : string , options ?: LogMessageOptions ) => void ;
13601409 } ;
13611410 /**
13621411 * Cryptographic utilities
0 commit comments