Fix the issue with paths resolving incorrectly for the webpack config
when running the master server with the --dev option from the project
root folder through either npx clusteriomaster or node packages/master
Use lib* prefix for the modules impored from the lib package to help
distinguish them more from ordinary variables. Fix up the naming
convention for files to be consistently lowercase_underscore for
JavaScript files.
Avoid any potential for accidentally installing multiple copies of
clusterio/lib by specifiying it as a peer dependency instead of a
regular dependency.
Split up codebase into the packages @clsterio/lib, @clusterio/master,
@clusterio/slave, and @clusterio/ctl using lerna to manage them. This
will allow deployment to use only the parts needed reducing install
size, and better separate the code into shared library, master, slave
and control.
Add factorio.enable_save_patching config entry to allow disabling the
save patching done on startup. This is for running vannila games or
scenarios that are not compatible with Clusterio.
Add users, roles and permissions and rework the authentication to use
separate user and slave tokens for control and slave connections
respectively.
Add commands for listing permissions, roles and users, and creating,
editing and deleting roles and users.
Implement notification to plugins for disconnect request, connect, drop,
and close. This allows plugins to properly handle slaves and the master
server shutting down without sending messages that will get lost.
Fix missing module declarations, broken lings, broken formating and
incorrect scopes in the documentation. For modules split over several
files it appears the only viable option is to use the memberof directive
on each documented member and only declare the index file as a module.
Fix crash when technologiy level stored on the master is greater than
the max_level for the technology in Factorio. This can happen with mods
that for example reduce the max_level from inifity to a finite level.
Fix research_sync sending out contribution events for the previous level
of a researched technology and sending finished events for the wrong
level when synchronizing technologies. Both of these issues are related
to failing to accunt for the unlocked level being one less than the
level stored when the researched property is false.
Fix log spam when the dole distribution method is used on
subspace_storage plugin. This was caused by a bogus if condition being
translated into a sensible but wrong one.
Add web_root option to the master server and use it create URLs for
resources hosted by it. This permits hosting the master server web
interface behind reverse proxy under a dedicated path.
Spawn master, slave, and clusterctl in separate processes in the
clusterio integration tests and leave the test master and slave process
available for the whole test duration to allow plugins to use them as
well. This removes the need for reimplementing the startup logic in the
test code and makes the existing startup code covered by tests.