Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.
Also extracted install command cleanup into class method and added tests
for that.
cc @markwal
No guarantees however that transporting anything BUT gcode via the usual
M28/M29 interface will even remotely work. Note that it most likely
won't work if the transferred file contains an M29 (= end transfer),
just like with transferred GCODE files.
Also note that stuff like config files or some such that might be
transferred might contain lines that are too large to fit into the
buffer of the printer. This is really just to enable plugins to maybe do
some nifty stuff, no official support of streaming arbitrary files to
the printer's SD (for that we'd need WAY more firmware support first).
See jneilliii/OctoPrint-SmoothiewareConfig#1
We so far assumed that a resend request would follow that. Alas, it
won't and we'll simply get stuck due to a missing ack from the printer.
So let's simulate that here to keep things flowing.
Fixes#2226
* we now don't send the triggered resend/comm errors out of band but
instead as a response to the next received actual line - that
prevents us from getting out of sync
* new trigger_missing_lineno debug function to trigger a missing line
number error _without_ a resend request for testing fix for #2226
Instead of hardcoding a list of supported mixins, we now instead define
a base class (or a list thereof) from which mixins might inherit and use
inspection to determine the set of mixins each plugin implementation
implements. Not only will that reduce the risk of forgetting to add a
new mixin to the whitelist, but it will also allow mixins defined by
plugins.
As seen in https://groups.google.com/forum/#!msg/octoprint/DyXdqhR0U7c/kKMUsMmIBgAJ
a broken entry_points.txt in some arbitrary Python package installed in
the same python envrionment as OctoPrint can make our whole plugin
detection fail and hence interrupt regular server startup.
This adds better protection against such cases.
If snapshot url and/or ffmpeg path are not set, the timelapse cannot
work regardless of what type has been configured.
So if the current configuration still contains a timelapse type other
than "off" but snapshot url or ffmpeg path are unset, force a disabled
timelapse.
Fixes#2206
* Add comment with source file to JsDelimiterBundler and
JsPluginDelimiterBundler
* Include source file name in JsPluginDelimiterBundler catch
block and use log.error instead of console.error