Replace socket.io with plain WebSocket using the ws library as it
doesn't really provide any useful tools over plain WebSocket when it
comes to implementing reliable communication that works across
reconnects. The widespread browser support for WebSocket also means
it has little value to add for the web interface over WebSocket.
Validate messages sent over links with the json schema provided from
them. This aids debugging as an exception will be thrown from the code
sending the bad content.
Catch errors thrown when constructing or initializing master pluigns and
wrap them in PluginError to ensure that they are properly reported as
plugin errors.
Catch errors and shut down the instance in question if the startup
failed. This happens if for example the Factorio server errors out on a
script during startup.
Add a library mod for wrapping the Clusterio remote API and providing
related utilities. This eases development of Clusterio related Lua code
by providing the same interface for both mods and modules and also makes
the serialize library available without having to duplicate it.
It is not possible to implement this through save patching as mods
cannot load Lua code from the level code like they can with code from
other mods.
Add library for serializing items and inventories to the clusterio
module. This will provide a common codebase for plugins like
playerManager and trainTeleports to use in order to serialize
inventories to the master server.
Remove the instructions for installing and using pm2 with clusterio, as
I don't know how to use this tool properly and can't keep the README up
to date on it.
Replace current configuration mess with a trimmed down version of the
original vision of #200. Configs are collection of config groups that
have fields that can be set. These groups allow organizing the fields
as well as opertunity for plugins to add their own groups. By default
plugins have an auto generated group with the enabled field.
Remove the remoteCommand specific config allowRemoteCommandExecution.
The plugin has been removed and with the move to master managing the
instances/slaves it makes no sense to deny remote commands.
Add startup event to the Clusterio module API which is raised at startup
of a Factorio server. This is to server as a replacement for the
on_init and on_configuration_changed events which cannot be used in
modules.
Adds clusterio_patch_number global from the patcher in order to
implement this. This is a number that's incremented every time the save
is patched.
Add option to FactorioServer.sendRcon to throw on non-empty responses
from Factorio. This is useful for detecting errors returned by commands
that should not have a response.
Change module loading to use a module.json file describing the module
and patch in all files in a directory path passed to the patcher instead
of having to pass the files names and their content. This allows the
specification of which files should be passed to the event_handler lib
and an easy implementation of loading stand alone modules.
Add an implementation of a Prometheus client. This is because the
prom-client implementation seems to have missunderstood how Prometheus
is supposed to work and doesn't allow updating collectors via
asynchronous callback.
Close active connections and http servers during master shutdown and let
node exit on its own. If this fails with an error set output streams to
blocking and report it then shutdown with process.exit.
Also add double SIGINT handling to immediately shutdown.