Terminal Helper Version Edits --------------------------------------------------------------------------------------------------------------------------------------------- Version 1.1.0 Updates & Fixes 1. Add conf_path variable to set method allowing loading from external config file. --------------------------------------------------------------------------------------------------------------------------------------------- Version 1.0.1 Updates & Fixes 1. Change package.json to try to resolve error when using NPM update --------------------------------------------------------------------------------------------------------------------------------------------- Version 1.0.0 Updates & Fixes 1. Add choice methods and class 2. Add STDIN, STDOUT & STDERR hooks 3. Add xconsole class to override default console.log behaviour 4. Move terminal commands to own file for easy adding/editing 5. Fix reverse typing on null/empty prompt string 6. Add fixes for cursor positioning 7. Fix command alias lookup issues 8. Add exit method (allows to add method for app cleanup) 9. General code cleanup 10. Fix example.js and add choice example 11. Add extra commands for Date, Time, Uptime etc --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.9 Updates & Fixes 1. Fix for log dir exists crash underlying issue --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.8 Updates & Fixes 1. Fix for log dir exists crash --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.7 Updates & Fixes 1. Fix for undefined key issue when typing -_=+ etc. --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.6 Updates & Fixes 1. Fix version information --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.5 Updates & Fixes 1. Changed clear window method to use a control code instead of an octal literal (tested on Win10) 2. Add echo and callback parameters to Run method allowing output to be optional, the callback method runs on completion (callback passes the parameters err and data which contain the command error and output data accordingly). 3. Added return data for the run method, run now returns the callback method return data or the command output if a callback is not specified 4. Renamed termhelper.lib.js to termhelper.conf.js (for easier understanding) 5. Added methods using the standard naming convention ie. term.Run can be called with term.run (note: capitalised names are now deprecated and will be removed in future releases) 6. Added recognition of control codes for home and end keys (all tested and working properly now) --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.4 Updates & Fixes 1. Various fixes (catch up required, only applied to NPM repo) --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.3 Updates & Fixes 1. Testing started on Windows10 2. Added missing InvalidCommand locale variable and updated termhelper.js 3. Added empty string check on Show method to fix false triggering 4. Changed line processing to trigger on any line end character (cr/lf/crlf) to avoid issues when windows changes from crlf to cr * 5. Added clear screen alias (not working in windows at this time) 6. Added locale variables for application exit and kill (ctrl+c) 7. Updated example.js Notes: * This no longer uses lineEndIn settings variable --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.2 Updates & Fixes 1. Fixed typos 2. Added missing comma --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.1 Updates & Fixes 1. Recreated rogue locale file and changed log.Writeln calls using locale vars 2. Added locale_path setting --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.2.0 Updates & Fixes 1. fix. settings when val is false, null or empty string [contribution by 'Olof Lofteskog' from the GitHub community] --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.9 Updates & Fixes 1. Added 'processing' switch to settings, allows input processing to be turned off 2. Added 'proc_enter' setting to stop termhelper processing the enter key --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.8 Updates & Fixes 1. House keeping --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.7 Updates & Fixes 1. Changed default error level reporting 2. Fixed crash on empty prompt string --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.6 Updates & Fixes 1. Added ability to change locale strings using set method 2. Added new methods to README.md --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.5 Updates & Fixes 1. Removed old commented test code 2. Fixed line event processing bug 3. Changed Echo function to Eval 4. Added new Echo function to output object as text 5. Planned to fix cursor position issue when prompt is disabled on next release --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.4 Updates & Fixes 1. Fixed crash on special key input 2. Added version method to exports and %v variable to getPrompt method 3. Fixed invalid command output string 4. Added module object to display termhelper details with evaluated commands and methods 5. Added locale files for output text 6. Added show method to exports to output data from module object 7. Added StripLineEnd method to exports object 8. Cleaned up some code 9. Updated README.md --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.3 Updates & Fixes 1. Fixed log error 2. Updated package.json readme data --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.2 Updates & Fixes 1. Updated to work with newer keypress module 2. Removed single line end character variable to allow different characters for output and input --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.1 Updates & Fixes 1. Removed prompt method from termhelper.lib.js 2. Changed termhelper.js prompt method to output prompt 3. Added getPrompt method and changed code to get prompt length from this method 4. Added ability to output information on the prompt 5: Added 'app' object for storing application data for use when setting the prompt 6. Changed Writeln method to evaluate objects 7. Updated example.js to demonstrate more and added comments 8. Updated README.md --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.1.0 Updates & Fixes 1. Added log setting for prepending timestamp 2. Added object output functionality to Writeln method 3. Added test1 keyword to example.js to test object output 4. Added exit and prompt methods to line processing 5. Line processing will output 'invalid command' when event handler returns false or an object containing a key named 'valid' and the value false 6. Renamed termhelper.lib.js key 'Settings' to 'settings' 7. Added section variable to set method 8. Moved runAlias setting to alias.run 9. Added aliases for all other line processing commands 10. Removed ambiguous append keypress char on enter key and call to replace 11. Changed termHistory to integer denoting maximum length 12. Added ability to skip individual keypress events 13. Added code to check last command in history is not the same as the current command 14. Added lib object for external access to termhelper.lib.js --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.0.9 Updates & Fixes 1. Changed echo method to output a string on invalid JavaScript 2. Update README.md with new commands 3. Changed WriteLog method to log.Write 4. Added log.Writeln method 5. Added log.set method to change log settings 6. Fixed delete key processing to allow deletion of first character 7. Added home and end key processing to move cursor to start/end of line 8. Added callback method to log write 9. Moved process.kill in to log write callback function --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.0.8 Updates & Fixes 1. Added comments to termhelper.lib.js 2. Added input / output file logging options 3. Moved prompt command to line input method from Writeln and added a boolean to disable it for run command etc. 4. Added echo method to evaluate algorithms and output results. Echo will output a string if it is not a valid JavaScript algorithm. --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.0.7 Updates & Fixes 1. Added Prompt command to Writeln method 2. Added developer IRC details to README.md --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.0.6 Updates & Fixes 1. Fix bug in Writeln function that was instroduced in 0.0.5 --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.0.5 Updates 1. Added run command to line processing to execute shell commands 2. Removed keypress event override from example.js to allow commands such as 'ls' to be tested 3. Added allowRun and runAlias settings for executing shell commands 4. Added delete key processing --------------------------------------------------------------------------------------------------------------------------------------------- Version 0.0.4 Updates 1. Parsed code using JSLint (http://www.jslint.com) and fixed all issues found. 2. Fixed issue with input history deleting the last letter from commands --------------------------------------------------------------------------------------------------------------------------------------------- New To Version 0.0.3 1. Fixed error on backspace command --------------------------------------------------------------------------------------------------------------------------------------------- New To Version 0.0.2 1. Added alowance for settings to contain an object containing key/value pairs. 2. Renamed termHelper.lib.js to all lowercase to match the naming convention required by NPM. 3. Edited code to stop deletion and moving cursor through the prompt. 4. Enter key now appends line end character from settings. 5. Added setting to append line end character to string passed to "on line" event. 6. Added example.js file for testing termhelper. 7. Moved keypress event trigger to occur after processing. 8. Added 'before_proc' event to trigger before keypress processing occurs.