Skip to content

Add @clack/prompts with spinner functionality to progress module #4

Description

@amondnet

Summary

Add @clack/prompts package to enable interactive prompts and animated spinner functionality in the progress module.

Motivation

  • Need spinner support for long-running operations
  • Want interactive CLI prompts (text, select, confirm, etc.)
  • Enhance user experience with visual feedback

Proposed Implementation

New Files

  • src/progress/spinner.ts - Spinner wrapper around @clack/prompts
  • src/progress/prompts.ts - Interactive prompt functions
  • test/progress/spinner.test.ts - Spinner tests
  • test/progress/prompts.test.ts - Prompts tests

Modified Files

  • src/progress/index.ts - Export new functions/types
  • src/index.ts - Re-export from main entry
  • package.json - Add @clack/prompts dependency

Features

  • createSpinner() - Start/stop/error methods for animated spinner
  • promptText(), promptSelect(), promptConfirm() - Interactive prompts
  • Maintains consistency with existing createProgressIndicator()
  • Backward compatible

Tasks

  • Add @clack/prompts to package.json
  • Implement spinner.ts with createSpinner()
  • Implement prompts.ts with prompt functions
  • Write tests for spinner
  • Write tests for prompts
  • Update exports in progress/index.ts
  • Update main src/index.ts
  • Add documentation/JSDoc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions