or run

npx @tessl/cli init
Log in

Version

Files

docs

advanced-colors.mdbackground-colors.mdbasic-colors.mdcolor-support.mdconfiguration.mdindex.mdtext-styling.md
tile.json

task.mdevals/scenario-4/

Status Highlighter

Format arrays of log entries into newline-separated output that colorizes status labels with the standard foreground palette and uses a bright alias for supporting metadata. Each line follows the pattern (<timestamp>) STATUS: message when a timestamp exists, otherwise STATUS: message, with no trailing newline.

Capabilities

Standard color labels

  • A single entry with status error renders as ERROR: message with the status label colored using the standard red foreground and the message unstyled. @test
  • A single entry with status info renders as INFO: message with the status label colored using the standard cyan foreground and the message unstyled. @test

Bright alias metadata

  • When an entry includes a timestamp, the timestamp is prefixed in parentheses ahead of the status label and styled using the bright gray alias foreground, while the status color and message remain intact. @test

Mixed entry list

  • Multiple entries are formatted in order as separate lines, each applying the standard foreground color mapping {error→red, warn→yellow, info→cyan} to the status label, and leaving unknown statuses unstyled. @test

Implementation

@generates

API

/**
 * @typedef {Object} LogEntry
 * @property {'error' | 'warn' | 'info'} status
 * @property {string} message
 * @property {string} [timestamp]
 */

/**
 * Formats log entries into newline-separated strings with colored status labels and optional timestamp metadata.
 * @param {LogEntry[]} entries
 * @returns {string} Combined, formatted log output with trailing newline trimmed.
 */
function formatLog(entries) {}

Dependencies { .dependencies }

chalk { .dependency }

Provides standard and bright foreground color helpers for terminal text.