1.8 KiB
1.8 KiB
Logging Improvements - January 2025
Overview
Enhanced TSPublish logging system with @push.rocks/smartlog and @push.rocks/consolecolor for better visual feedback and user experience.
Changes Made
1. Dependencies
- Added @push.rocks/consolecolor (v2.0.3) for colored console output
2. Enhanced logging.ts
- Created color-coded log level indicators with emojis
- Added specialized logging functions:
logInfo()
- Cyan info messageslogSuccess()
- Green success messageslogWarn()
- Orange warning messageslogError()
- Red error messageslogStart()
- Blue start indicatorslogDone()
- Green completion indicatorslogPackage()
- Package-specific messages with iconslogBuild()
- Build messages with hammer iconlogPublish()
- Publish messages with rocket iconlogOngoing()
- Ongoing operations with spinner icon
- Added visual helpers:
logSeparator()
- Cyan line separatorlogHeader()
- Colored section headerslogProgress()
- Progress bar with percentage
3. Updated classes.tspublish.ts
- Added colored header at startup
- Module discovery uses colored bullets
- Progress tracking for module processing
- Better visual separation between phases
4. Updated classes.publishmodule.ts
- Added visual indicators for each operation phase
- Build process shows building status and completion
- Publishing shows rocket icon and success message
- NPM registry checks have clearer warnings
5. Updated index.ts
- Replaced console.log with logStart()
Benefits
- Clearer visual hierarchy of information
- Easier to track progress through long operations
- Better distinction between info, warnings, and errors
- More professional and polished CLI output
- Semantic icons make status immediately recognizable