vibefast-cli 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to VibeFast CLI will be documented in this file.
4
4
 
5
+ ## [0.2.2] - 2024-11-14
6
+
7
+ ### Fixed
8
+ - **Error Messages**: Removed nested error wrapping that caused confusing messages
9
+ - Error messages are now clean and single-level with helpful context
10
+ - Improved error display in `list`, `devices`, and `add` commands
11
+
5
12
  ## [0.2.0] - 2024-11-13
6
13
 
7
14
  ### Added
@@ -0,0 +1,64 @@
1
+ # Error Message Cleanup - Complete ✅
2
+
3
+ ## Problem
4
+ Error messages were being nested multiple times, creating confusing output like:
5
+ ```
6
+ Failed to list recipes: Failed to connect to...: Failed to fetch recipes: license_key not found
7
+ ```
8
+
9
+ ## Root Cause
10
+ Three layers of error wrapping:
11
+ 1. **Worker** returns: `"license_key not found"`
12
+ 2. **http.ts** wrapped it: `"Failed to fetch recipes: license_key not found"`
13
+ 3. **Command** wrapped again: `"Failed to list recipes: Failed to connect to..."`
14
+
15
+ ## Solution
16
+ Cleaned up error handling at each layer:
17
+
18
+ ### 1. http.ts (Core Layer)
19
+ - `listRecipes()`: Returns clean error messages without "Failed to fetch recipes" prefix
20
+ - `listDevices()`: Returns clean error messages without "Failed to manage devices" prefix
21
+ - `fetchRecipe()`: Returns structured response with clean error/message fields
22
+ - Network errors: Simple "Network error: ..." format
23
+
24
+ ### 2. Commands (UI Layer)
25
+ - **list.ts**: Removed "Failed to list recipes" prefix
26
+ - **devices.ts**: Removed "Failed to manage devices" prefix
27
+ - **add.ts**: Removed "Failed to fetch recipe" prefix
28
+ - All commands now display the clean error from http.ts directly
29
+
30
+ ### 3. User-Friendly Error Display
31
+ Commands still provide helpful context:
32
+ - ❌ Clear error icon and message
33
+ - 📋 Actionable steps to fix the issue
34
+ - 🔗 Support contact information
35
+ - 💡 Helpful tips and commands
36
+
37
+ ## Result
38
+ Clean, single-level error messages:
39
+ ```
40
+ ❌ Invalid or expired license key
41
+
42
+ Your license key may be:
43
+ • Incorrect or mistyped
44
+ • Expired
45
+ • Not yet activated
46
+
47
+ To fix this:
48
+ 1. Check your license key from your purchase receipt
49
+ 2. Run: vf logout
50
+ 3. Run: vf login --token YOUR_LICENSE_KEY
51
+
52
+ Need help? Contact support@vibefast.pro
53
+ ```
54
+
55
+ ## Files Modified
56
+ - ✅ `src/core/http.ts` - Clean error throwing
57
+ - ✅ `src/commands/list.ts` - Removed error prefix
58
+ - ✅ `src/commands/devices.ts` - Removed error prefix
59
+ - ✅ `src/commands/add.ts` - Removed error prefix
60
+
61
+ ## Testing
62
+ - ✅ All unit tests pass (34/34)
63
+ - ✅ Error messages are now clean and user-friendly
64
+ - ✅ No nested error wrapping