Common
- Added new libs: sudoer, satan, ocelot, linus, wink, petit, tuna, clean-exit.
- Lock additional version packages in shrinkwrap (scrambler, memorize, reply).
- Updated libs: getset, triggers, entry, needle (better querystring builder).
- Use 'whenever' lib for loading some modules. This speeds up loading and reduces memory usage.
- Cleanup: Moved exceptions from agent into common ground, with a few fixes.
- Removed unused utils: scrambler.js and finder.js. Replaced exit.js with clean-exit module.
- Replace system/linux/sudo.js with sudoer library.
Agent
- New plugin structure, based on 'wink' module that provides an easy way to extend the agent.
- Boot logic: Load triggers before plugins. Handle plugin load errors on boot (remove from config if not found).
- Fixed actions. Now require function returns synchronously.
- Rename process title to 'prx'.
- bin/prey: Using a shell-based version, using exec so we don't spawn a new process when run.
- Fixed bin/prey script so it works when symlinked via npm -g install
- Added agent.reload() function. Removed unused agent.engage().
- Removed --driver option from agent/cli.
- Much better signal handling logic. Shutdown gracefully with a custom time limit, and make sure we don't exit with a 0 on SIGTERMs.
- Better log message when agent is running. Added our logo to the log message header!
- Better handling of network errors in agent and actions (ENETDOWN, ENETUNREACH, EADDRINFO, ENOTFOUND).
- Moved (enhanced) reconnect logic from connection watcher to agent index. And make connection watcher acts as a trigger.
- Return a NO_VERSIONS_SUPPORT code error when updater.check() cannot continue.
- Renamed 'endpoints' to 'transports', and fixed a few things. Removed unused 'default.options' files.
- Moved command logic to ./lib/agent/command.
- Moved store/restore commands from db into agent/commands.js.
- Fixed build command in commands.parse.
- Removed unused helpers.
- Removed tunnel.js in favor of new 'tuna' module.
- Removed logger.js in favour of smaller implementation in 'petit' library.
Plugins
- Refactored existing drivers into plugins, added tests, and ensure they do unload on plugin.unload().
- Refactored interval/push drivers into a 'control-panel' plugin, that now includes the 'api' module and encapsulates all CP-related stuff.
- Added retry-reports plugin.
- Added email-sender plugin.
- Added campfire plugin, using our custom version of 'node-campfire' module. Now includes data processors to allow posting images and map URLs.
- CP: Better map/unmap/stop/retry port mapping logic for CP's push adapter. Make sure PMP client is closed when unmapping port.
- CP: Log notification_id update failures.
- CP: Fixed setting of host/protocol options in API (both in plugin and conf modules).
- CP: Don't delete API key on plugin deactivation.
- Console: Notify action status in console.
Config
- Big refactor in 'lib/conf'. Split it into separate modules (GUI, account, tasks, etc).
- Updated default.options and prey.conf.default file, using new plugin structure (e.g. api_key/device_key is now scoped under 'control_panel').
- Added 'config plugins' section that allows enabling, disabling and setting up installed plugins.
- Added 'config log' option that shows log output and allows dumping to file.
- Removed 'config settings' section that was pretty useless.
- Removed deactivate command.
- 'config activate' now ensures is never run as root on Linux or Mac.
- Refactored much of the post_install/pre_uninstall logic. post_install now handles user creation and permissions.
- 'post_install' hook also activates installation, so there's no need to run both commands on installation.
- Much cleaner 'check if writable' logic in conf/cli, as well as root/non-root detection.
- GUI: Fixed bin path detection in Linux and OSX configurators. Fixed logo rendering in OSX.
- Better argument parsing in Operetta library. Added 'keyword' option. Show help message when command doesn't match.
- Fixed cp() util. Added error handling.
- Use new 'satan' lib for setting up daemon and init script. So removed all .plist and .conf stuff that we don't need.
- Moved conf/prompt script to control-panel plugin setup routine.
Tools, Tests
- Removed post_install/pre_install scripts as their logic is now completely handled inside the 'conf' module.
- Moved (dev) ./scripts into ./tools.
- Updated build tool. Allow building specific version.
- Added code coverage command, using 'istanbul' lib.
- Specs are back to 100%. Refactored big parts of it and removed deprecated stuff.
- Added several new specs: exceptions, plugin loader, install/update, control-panel plugin, etc.