49 lines
1.8 KiB
Markdown
49 lines
1.8 KiB
Markdown
# 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 messages
|
|
- `logSuccess()` - Green success messages
|
|
- `logWarn()` - Orange warning messages
|
|
- `logError()` - Red error messages
|
|
- `logStart()` - Blue start indicators
|
|
- `logDone()` - Green completion indicators
|
|
- `logPackage()` - Package-specific messages with icons
|
|
- `logBuild()` - Build messages with hammer icon
|
|
- `logPublish()` - Publish messages with rocket icon
|
|
- `logOngoing()` - Ongoing operations with spinner icon
|
|
- Added visual helpers:
|
|
- `logSeparator()` - Cyan line separator
|
|
- `logHeader()` - Colored section headers
|
|
- `logProgress()` - 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 |