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