Sometimes they will still get discovered by python even though their packages have since been uninstalled.
This will also lead to them being reloaded after an uninstall and a subsequent plugin reload.
Marking them as uninstalled and not handing out uninstalled plugins when collecting them solves this.
Added phase specific hooks for queuing, queued, sending and sent phases of a command ("octoprint.comm.protocol.gcode.<phase>"). Removed old queuing phase hook and declared as obsolete hook in plugin manager to prevent plugins that depend on it from being enabled.
Adding those new hooks also necessitated refactoring the whole command processing, made it more modular and added phase specific handler functions that allow handling all blocking commands centrally for example.
Since it cannot be reliably determined by the system if a hook is essential for a plugin's functionality or not, it makes more sense to just disable plugins that utilize obsolete hooks then risk running half working plugins.
This will hopefully prevent conflicting routes between multiple plugins from being registered and also ensures a more consistent behaviour compared to BlueprintPlugin mixins.
Thanks to @Salandora for bringing this up.
Hidden files (starting with .) will produce a 404. This also excludes .metadata.yaml from being downloadable. The alternative of adding all extensions defined by plugins to the regex dynamically was not chosen since that would necessitate to make plugins implementing the "octoprint.filemanager.extension_tree" hook restart needing plugins in the lifecycle management for a minimal gain in perceived security.
Solves #897
Added a setting to allow -90 degree rotation. Combined with fliph and
flipv, I think this means every one of the 8 major orientations is covered
(2^3). 0, 90, 180, 270 times 2 (mirror image in each rotation). I chose
-90 instead of 90 because that keeps the upper left corner pinned to the
same spot.
The extra ms-transforms aren't for this issue exactly but allowed me to
test my changes in ie. I've tested Chrome, Firefox and IE11. I don't
have Safari handy, but if it breaks it *should* be only when this is
enabled.
Otherwise we get import issues during build since the octoprint module depends on the dependencies already being present what they obviously can't be at the beginning of setup.
Babel related commands and the Clean command for setup.py are not reusable by plugins as well. Also added a factory method for plugin setup parameters.
The new hook allows extending the list of rules for maximum body sizes differing from the default of 100KB and can be used by plugins to allow uploads to them that exceed that file size.
Also extended the plugin manager to detect plugins that implement restart needing hooks (such as the above one) and handling those plugins the same as plugins containing implementations that inherit from octoprint.plugin.core.RestartNeedingPlugin
Have you ever noticed when developing that every time you stop and start
the server, the terminal window gets an extra duplicate line for every
reconnect attempt? Well, it's because (I think) "delete" in javascript
just removes the indicated name from the namespace, it doesn't actually
free up an object. Those zombie objects are still there and wake up (for
some transports) on reconnect. Might be different in SockJS v1 or later.
Cache clearing doesn't work reliably with location.reload(true), leading to cache induced infinite loop when disabling access control (since generated template still assumes first run dialog to be active). Disabling for now, need to find a better way to reload the page while clearing the browser's and server's cache (same issue exists for plugins needing a client side triggered reload).
Fixes#886