canvaslms-cli 1.6.0 → 1.6.3

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +210 -186
  2. package/README.md +131 -129
  3. package/dist/commands/announcements.d.ts +2 -2
  4. package/dist/commands/announcements.d.ts.map +1 -1
  5. package/dist/commands/announcements.js +43 -124
  6. package/dist/commands/announcements.js.map +1 -1
  7. package/dist/commands/api.d.ts +1 -1
  8. package/dist/commands/api.d.ts.map +1 -1
  9. package/dist/commands/api.js +1 -1
  10. package/dist/commands/api.js.map +1 -1
  11. package/dist/commands/assignments.d.ts +2 -2
  12. package/dist/commands/assignments.d.ts.map +1 -1
  13. package/dist/commands/assignments.js +40 -128
  14. package/dist/commands/assignments.js.map +1 -1
  15. package/dist/commands/config.d.ts.map +1 -1
  16. package/dist/commands/config.js +102 -85
  17. package/dist/commands/config.js.map +1 -1
  18. package/dist/commands/grades.d.ts +2 -2
  19. package/dist/commands/grades.d.ts.map +1 -1
  20. package/dist/commands/grades.js +296 -178
  21. package/dist/commands/grades.js.map +1 -1
  22. package/dist/commands/list.d.ts +1 -1
  23. package/dist/commands/list.d.ts.map +1 -1
  24. package/dist/commands/list.js +26 -46
  25. package/dist/commands/list.js.map +1 -1
  26. package/dist/commands/profile.d.ts.map +1 -1
  27. package/dist/commands/profile.js +57 -32
  28. package/dist/commands/profile.js.map +1 -1
  29. package/dist/commands/submit.d.ts +2 -2
  30. package/dist/commands/submit.d.ts.map +1 -1
  31. package/dist/commands/submit.js +110 -165
  32. package/dist/commands/submit.js.map +1 -1
  33. package/dist/index.d.ts +14 -14
  34. package/dist/index.js +14 -14
  35. package/dist/lib/api-client.d.ts +3 -0
  36. package/dist/lib/api-client.d.ts.map +1 -1
  37. package/dist/lib/api-client.js +31 -16
  38. package/dist/lib/api-client.js.map +1 -1
  39. package/dist/lib/config-validator.d.ts.map +1 -1
  40. package/dist/lib/config-validator.js +12 -12
  41. package/dist/lib/config-validator.js.map +1 -1
  42. package/dist/lib/config.d.ts +1 -1
  43. package/dist/lib/config.d.ts.map +1 -1
  44. package/dist/lib/config.js +16 -14
  45. package/dist/lib/config.js.map +1 -1
  46. package/dist/lib/display.d.ts +84 -0
  47. package/dist/lib/display.d.ts.map +1 -0
  48. package/dist/lib/display.js +603 -0
  49. package/dist/lib/display.js.map +1 -0
  50. package/dist/lib/file-upload.d.ts.map +1 -1
  51. package/dist/lib/file-upload.js +17 -17
  52. package/dist/lib/file-upload.js.map +1 -1
  53. package/dist/lib/interactive.d.ts +1 -1
  54. package/dist/lib/interactive.d.ts.map +1 -1
  55. package/dist/lib/interactive.js +200 -143
  56. package/dist/lib/interactive.js.map +1 -1
  57. package/dist/src/index.d.ts +0 -1
  58. package/dist/src/index.js +62 -62
  59. package/dist/src/index.js.map +1 -1
  60. package/dist/types/index.d.ts +1 -1
  61. package/package.json +9 -4
  62. package/dist/commands/coursenames.d.ts +0 -15
  63. package/dist/commands/coursenames.d.ts.map +0 -1
  64. package/dist/commands/coursenames.js +0 -150
  65. package/dist/commands/coursenames.js.map +0 -1
  66. package/dist/lib/course-utils.d.ts +0 -6
  67. package/dist/lib/course-utils.d.ts.map +0 -1
  68. package/dist/lib/course-utils.js +0 -17
  69. package/dist/lib/course-utils.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,186 +1,210 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.6.0] - 2025-12-06
9
-
10
- ### Added
11
-
12
- - **Boxed Table Displays**: All commands now display data in modern boxed tables with rounded corners (╭╮╰╯)
13
- - **Adaptive Column Widths**: Tables dynamically adjust column widths based on terminal size for optimal display
14
- - **Color-Coded Grades**: Assignment grades are now color-coded (green: ≥80%, yellow: ≥50%, red: <50%)
15
- - **Announcements Table**: Course selection and announcements list now displayed in formatted tables
16
- - **Profile Table**: User profile information displayed in clean field/value table format
17
-
18
- ### Changed
19
-
20
- - **Grades Display**: Merged official grades and calculated statistics into a unified table
21
- - **CLI Descriptions**: Shortened command descriptions for cleaner help output
22
- - **Config Output**: Simplified config help by removing redundant command examples
23
- - **Submit Command**: Updated to use rounded corners and adaptive widths
24
- - **Line Endings**: Standardized all files to LF line endings
25
-
26
- ### Technical
27
-
28
- - Consistent use of box-drawing characters across all commands
29
- - Improved terminal width detection for responsive layouts
30
-
31
- ## [1.5.1] - 2025-11-05
32
-
33
- ## [1.4.7] - 2025-11-05
34
-
35
- ### Added
36
-
37
- - Show allowed file extensions hint in the interactive file browser when an assignment restricts uploads (e.g. "Allowed: .pdf, .docx").
38
- - Add `r` keybinding to the file browser to reload the current directory listing without exiting the browser.
39
-
40
- ### Fixed
41
-
42
- - Prevent the interactive file browser from permanently removing other stdin listeners: save and restore `process.stdin` 'data' listeners so `readline` and SIGINT (Ctrl+C) continue to work after browser exit.
43
- - Filter file browser listings by `allowed_extensions` when provided by the assignment so disallowed file types cannot be selected (prevents HTTP 400 "filetype not allowed").
44
- - Allow pressing Enter at the final "Proceed with submission? (Y/n)" prompt to accept the default (Yes) to match the shown prompt.
45
-
46
- ### Notes
47
-
48
- - Bumped package version to 1.4.7.
49
-
50
-
51
- ### Added
52
-
53
- - **Enhanced File Selection UX**: Implemented continuous file selection until empty input
54
- - Browse current directory with file size display
55
- - Add multiple files one by one
56
- - Remove files from selection
57
- - Show currently selected files
58
- - Smart file filtering (excludes hidden files, package files)
59
- - **Wildcard support**: Use patterns like *.html, *.js, *.pdf to select multiple files
60
- - File type icons for better visual identification
61
-
62
- - **Improved Grade Viewing**:
63
- - Interactive course selection for grade viewing
64
- - Assignment-level grade details with color coding
65
- - Overall course grade summary
66
- - Better grade formatting and status indicators
67
- - Support for letter grades, excused, and missing assignments
68
-
69
- - **Enhanced Display Names**:
70
- - Show course names instead of IDs in all commands
71
- - Display assignment names prominently
72
- - Better labeling of IDs vs names throughout interface
73
-
74
- - **Interactive Utilities**:
75
- - Added validation and retry logic for user input
76
- - Confirmation helpers with default values
77
- - List selection utilities with cancel option
78
-
79
- ### Improved
80
-
81
- - **Submit Command**: Complete redesign with better file selection workflow
82
- - **Grades Command**: Interactive course selection and detailed assignment grades
83
- - **Assignments Command**: Display course names prominently
84
- - **Announcements Command**: Show course names instead of IDs
85
- - **User Experience**: More consistent and intuitive interfaces across all commands
86
-
87
- ### Fixed
88
-
89
- - **Assignment Name Display**: Fixed "Unknown Assignment" issue in submission summary
90
- - **File Selection Flow**: Better error handling and user guidance during file selection
91
- - **Variable Scope**: Proper assignment variable handling throughout submission process
92
-
93
- ### Technical
94
-
95
- - Enhanced interactive utilities in `lib/interactive.js`
96
- - Better error handling and user guidance
97
- - Improved code organization and modularity
98
-
99
- ## [1.1.1] - 2025-07-03
100
-
101
- ### Fixed
102
-
103
- - Removed dotenv dependency that was causing module not found errors
104
- - Fixed configuration file path to use `.canvaslms-cli-config.json`
105
- - Resolved package publishing and global installation issues
106
-
107
- ### Added
108
-
109
- - Dual binary support: both `canvaslms-cli` and `canvas` commands work
110
-
111
- ## [1.1.0] - 2025-07-03
112
-
113
- ### Major Changes
114
-
115
- - Home directory configuration system (~/.canvaslms-cli-config.json)
116
- - Interactive configuration setup wizard (`canvas config setup`)
117
- - Configuration management subcommands:
118
- - `canvas config show` - Display current configuration
119
- - `canvas config edit` - Edit existing configuration
120
- - `canvas config path` - Show config file location
121
- - `canvas config delete` - Remove configuration file
122
- - Automatic configuration validation for all commands
123
- - Improved error handling and user guidance
124
-
125
- ### Changed
126
-
127
- - **BREAKING**: Removed environment variable support (.env files)
128
- - Configuration now stored in user's home directory instead of project directory
129
- - Enhanced configuration validation with better error messages
130
- - Improved user onboarding with guided setup process
131
-
132
- ### Removed
133
-
134
- - dotenv dependency (no longer needed)
135
- - Environment variable fallback support
136
-
137
- ## [1.0.0] - 2025-07-03
138
-
139
- ### Added
140
-
141
- - Initial release of Canvas CLI Tool
142
- - Modular architecture with separate command handlers
143
- - Interactive assignment submission with file upload
144
- - Course management (list starred/all courses)
145
- - Assignment operations (view, filter by status)
146
- - Grade viewing for all courses or specific course
147
- - Announcements viewing
148
- - User profile management
149
- - Raw API access for all HTTP methods (GET, POST, PUT, DELETE)
150
- - Comprehensive configuration management
151
- - Color-coded output for better readability
152
- - Support for multiple file uploads
153
- - File selection from current directory
154
- - Detailed verbose modes for all commands
155
-
156
- ### Features
157
-
158
- - 📚 Course listing with favorites support
159
- - 📝 Assignment management with status indicators
160
- - 🚀 Interactive file submission workflow
161
- - 📢 Announcement viewing
162
- - 👤 Profile information display
163
- - 🔧 Direct Canvas API access
164
- - ⚡ Command aliases for faster usage
165
- - 🎨 Color-coded grade display
166
- - 📁 Smart file selection interface
167
-
168
- ### Technical
169
-
170
- - Modular command structure in separate files
171
- - Reusable API client library
172
- - Interactive prompt utilities
173
- - File upload handling with progress indicators
174
- - Error handling and user-friendly messages
175
- - Cross-platform compatibility
176
-
177
- ## [Unreleased]
178
-
179
- ### Planned Features
180
-
181
- - Assignment creation and editing
182
- - Bulk operations
183
- - Plugin system
184
- - Advanced filtering options
185
- - Export functionality
186
- - Offline mode support
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.6.3] - 2025-12-14
9
+
10
+ ### Added (1.6.3)
11
+
12
+ - **Live table resize**: Tables re-render automatically when terminal is resized
13
+ - **Adaptive truncation**: Text truncation updates dynamically based on terminal width
14
+
15
+ ### Fixed (1.6.3)
16
+
17
+ - **Submit table truncation**: Reduced excessive truncation in the submit table by compacting columns and shortening date format
18
+ - **Table overflow**: Fixed tables overflowing terminal width on small screens
19
+ - **Column width calculation**: Corrected border overhead calculation for accurate fitting
20
+
21
+ ### Changed (1.6.3)
22
+
23
+ - **Submit table columns**: Optimized and tightened column widths for compact display (Assignment Name max width set to 35, Type fixed at 8, Due fixed at 16 with MM/DD/YYYY formatting, Status fixed at 12)
24
+
25
+ ## [1.6.2] - 2025-12-14
26
+
27
+ - **Table display**: All table now have the same rounded corner format, text size adaptive to the terminal size
28
+
29
+ ## [1.6.1] - 2025-12-13
30
+
31
+ - **Dry Run Mode**: Submit command now supports `--dry-run` flag to test submission flow without actually uploading files or submitting assignments
32
+ - **Assignment URL Display**: After successful submission, the direct link to the assignment is now displayed for easy access
33
+
34
+ ## [1.6.0] - 2025-12-06
35
+
36
+ ### Added (1.6.0)
37
+
38
+ - **Boxed Table Displays**: All commands now display data in modern boxed tables with rounded corners (╭╮╰╯)
39
+ - **Adaptive Column Widths**: Tables dynamically adjust column widths based on terminal size for optimal display
40
+ - **Color-Coded Grades**: Assignment grades are now color-coded (green: ≥80%, yellow: ≥50%, red: <50%)
41
+ - **Announcements Table**: Course selection and announcements list now displayed in formatted tables
42
+ - **Profile Table**: User profile information displayed in clean field/value table format
43
+
44
+ ### Changed (1.6.0)
45
+
46
+ - **Grades Display**: Merged official grades and calculated statistics into a unified table
47
+ - **CLI Descriptions**: Shortened command descriptions for cleaner help output
48
+ - **Config Output**: Simplified config help by removing redundant command examples
49
+ - **Submit Command**: Updated to use rounded corners and adaptive widths
50
+ - **Line Endings**: Standardized all files to LF line endings
51
+
52
+ ### Technical
53
+
54
+ - Consistent use of box-drawing characters across all commands
55
+ - Improved terminal width detection for responsive layouts
56
+
57
+ ## [1.5.1] - 2025-11-05
58
+
59
+ ## [1.4.7] - 2025-11-05
60
+
61
+ ### Added (1.4.7)
62
+
63
+ - Show allowed file extensions hint in the interactive file browser when an assignment restricts uploads (e.g. `*.pdf`, `*.docx`).
64
+ - Add `r` keybinding to the file browser to reload the current directory listing without exiting the browser.
65
+
66
+ - **Enhanced File Selection UX**: Implemented continuous file selection until empty input
67
+ - Browse current directory with file size display
68
+ - Add multiple files one by one
69
+ - Remove files from selection
70
+ - Show currently selected files
71
+ - Smart file filtering (excludes hidden files, package files)
72
+ - **Wildcard support**: Use patterns like `*.html`, `*.js`, `*.pdf` to select multiple files
73
+ - File type icons for better visual identification
74
+
75
+ - **Improved Grade Viewing**:
76
+ - Interactive course selection for grade viewing
77
+ - Assignment-level grade details with color coding
78
+ - Overall course grade summary
79
+ - Better grade formatting and status indicators
80
+ - Support for letter grades, excused, and missing assignments
81
+
82
+ ### Notes (1.4.7)
83
+
84
+ - Bumped package version to 1.4.7.
85
+ - Assignment-level grade details with color coding
86
+ - Overall course grade summary
87
+ - Better grade formatting and status indicators
88
+ - Support for letter grades, excused, and missing assignments
89
+
90
+ - **Enhanced Display Names**:
91
+ - Show course names instead of IDs in all commands
92
+ - Display assignment names prominently
93
+ - Better labeling of IDs vs names throughout interface
94
+
95
+ - **Interactive Utilities**:
96
+ - Added validation and retry logic for user input
97
+ - Confirmation helpers with default values
98
+ - List selection utilities with cancel option
99
+
100
+ ### Improved (1.4.7)
101
+
102
+ - **Submit Command**: Complete redesign with better file selection workflow
103
+ - **Grades Command**: Interactive course selection and detailed assignment grades
104
+ - **Assignments Command**: Display course names prominently
105
+ - **Announcements Command**: Show course names instead of IDs
106
+ - **User Experience**: More consistent and intuitive interfaces across all commands
107
+
108
+ ### Fixed (1.4.7)
109
+
110
+ - Prevent the interactive file browser from permanently removing other stdin listeners: save and restore `process.stdin` 'data' listeners so `readline` and SIGINT (Ctrl+C) continue to work after browser exit.
111
+ - Filter file browser listings by `allowed_extensions` when provided by the assignment so disallowed file types cannot be selected (prevents HTTP 400 "filetype not allowed").
112
+ - Allow pressing Enter at the final "Proceed with submission? (Y/n)" prompt to accept the default (Yes) to match the shown prompt.
113
+ - **Assignment Name Display**: Fixed "Unknown Assignment" issue in submission summary
114
+ - **File Selection Flow**: Better error handling and user guidance during file selection
115
+ - **Variable Scope**: Proper assignment variable handling throughout submission process
116
+
117
+ ### Technical (1.4.7)
118
+
119
+ - Enhanced interactive utilities in `lib/interactive.js`
120
+ - Better error handling and user guidance
121
+ - Improved code organization and modularity
122
+
123
+ ## [1.1.1] - 2025-07-03
124
+
125
+ ### Fixed (1.1.1)
126
+
127
+ - Removed dotenv dependency that was causing module not found errors
128
+ - Fixed configuration file path to use `.canvaslms-cli-config.json`
129
+ - Resolved package publishing and global installation issues
130
+
131
+ ### Added (1.1.1)
132
+
133
+ - Dual binary support: both `canvaslms-cli` and `canvas` commands work
134
+
135
+ ## [1.1.0] - 2025-07-03
136
+
137
+ ### Major Changes (1.1.0)
138
+
139
+ - Home directory configuration system (~/.canvaslms-cli-config.json)
140
+ - Interactive configuration setup wizard (`canvas config setup`)
141
+ - Configuration management subcommands:
142
+ - `canvas config show` - Display current configuration
143
+ - `canvas config edit` - Edit existing configuration
144
+ - `canvas config path` - Show config file location
145
+ - `canvas config delete` - Remove configuration file
146
+ - Automatic configuration validation for all commands
147
+ - Improved error handling and user guidance
148
+
149
+ ### Changed (1.1.0)
150
+
151
+ - **BREAKING**: Removed environment variable support (.env files)
152
+ - Configuration now stored in user's home directory instead of project directory
153
+ - Enhanced configuration validation with better error messages
154
+ - Improved user onboarding with guided setup process
155
+
156
+ ### Removed (1.1.0)
157
+
158
+ - dotenv dependency (no longer needed)
159
+ - Environment variable fallback support
160
+
161
+ ## [1.0.0] - 2025-07-03
162
+
163
+ ### Added (1.0.0)
164
+
165
+ - Initial release of Canvas CLI Tool
166
+ - Modular architecture with separate command handlers
167
+ - Interactive assignment submission with file upload
168
+ - Course management (list starred/all courses)
169
+ - Assignment operations (view, filter by status)
170
+ - Grade viewing for all courses or specific course
171
+ - Announcements viewing
172
+ - User profile management
173
+ - Raw API access for all HTTP methods (GET, POST, PUT, DELETE)
174
+ - Comprehensive configuration management
175
+ - Color-coded output for better readability
176
+ - Support for multiple file uploads
177
+ - File selection from current directory
178
+ - Detailed verbose modes for all commands
179
+
180
+ ### Features (1.0.0)
181
+
182
+ - 📚 Course listing with favorites support
183
+ - 📝 Assignment management with status indicators
184
+ - 🚀 Interactive file submission workflow
185
+ - 📢 Announcement viewing
186
+ - 👤 Profile information display
187
+ - 🔧 Direct Canvas API access
188
+ - ⚡ Command aliases for faster usage
189
+ - 🎨 Color-coded grade display
190
+ - 📁 Smart file selection interface
191
+
192
+ ### Technical (1.0.0)
193
+
194
+ - Modular command structure in separate files
195
+ - Reusable API client library
196
+ - Interactive prompt utilities
197
+ - File upload handling with progress indicators
198
+ - Error handling and user-friendly messages
199
+ - Cross-platform compatibility
200
+
201
+ ## [Unreleased]
202
+
203
+ ### Planned Features (Unreleased)
204
+
205
+ - Assignment creation and editing
206
+ - Bulk operations
207
+ - Plugin system
208
+ - Advanced filtering options
209
+ - Export functionality
210
+ - Offline mode support