or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-10/

File Processing Monitor

Build a command-line application that processes a list of files while displaying real-time progress feedback to the user.

Requirements

Your application should:

  1. Accept a list of file paths as command-line arguments
  2. Process each file sequentially with a simulated processing delay
  3. Display a progress bar showing overall completion percentage
  4. Display a spinner animation during each file's processing with the current filename
  5. Output a completion message when all files are processed

The application should handle both TTY and non-TTY environments gracefully.

Behavior Specifications

  • The progress bar should update as each file completes processing
  • The progress bar should show percentage completion (0% to 100%)
  • The spinner should animate while processing each individual file
  • The spinner should display the name of the file currently being processed
  • When processing completes, output "All files processed successfully!"

Test Cases

Basic functionality

  • Processing 3 files ["file1.txt", "file2.txt", "file3.txt"] updates progress from 0% to 33% to 67% to 100% @test
  • The spinner displays during file processing and shows the current filename @test
  • After all files are processed, the completion message is displayed @test

Edge cases

  • Processing an empty list of files displays 100% progress immediately @test

Implementation

@generates

API

/**
 * Process a list of files with progress feedback
 * @param {string[]} files - Array of file paths to process
 * @param {number} delay - Delay in milliseconds to simulate processing time per file
 */
function processFiles(files, delay);

module.exports = { processFiles };

Dependencies { .dependencies }

cli { .dependency }

Provides command-line interface utilities including progress bar and spinner display functionality.

@satisfied-by