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
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.
Remove the unused dependencies to bcrypt and bcrypt-promise. These were
used by the playerManager plugin to implement password based
authentication, but this plugin is likely not going to be ported to 2.0.
Add ESLint as a dev dependency and configure it to match the preferred
style for the project. The config options set to warn are tentative and
may not be sensible as they haven't been fully investigated yet.
Upload the created export data zip file to a new /api/upload-export
endpoint on the master server which unpacks it into the appropriate
directory on the master.
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.
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.
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.
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.
The maintainers of bcrypt have in their infinite wisdom decided to stop
distributing Windows binaries. Their inner workings remain a mystery.
This is a port of 5fe98a0.
Rework client.js to support running multiple instances at once and be
managed remotely and implement the neccessary communication
infrastructure for this.
Due to circular dependencies on the implementation of this the master
branch is significantly broken after this.
Remove the .js suffix from help texts of node invocations as well as
actual invocations as this is not necessary. Removing it opens up the
possibility of restructuring the code into a directory with the same
name.
Remove Hotpatch and implement a save patcher in its place. The save
patcher takes a normal Factorio save and adds modules to it that's
loaded by a generated control.lua file. This greatly reduces the
difficulty of adding an existing game to Clusterio and using scenario
code in plugins.
The mechanism for selecting what code to patch into the saves from
plugins is temorary and expected to change with #220.
Break out the server process management to a new FactorioServer class in
lib/factorio. This class takes responsibility for managing a factorio
server, communicating with it and handling the stopping of it. It also
replaces the previous effort to do this in lib/factorioServer.
This change also updates the version of rcon-client, and since the
author of it has updated it to use UTF-8 the fork is no longer
necessary. It also removes the messageInterface implementation
in favor of just calling the rcon-client library directly since
this has rate limiting logic built in.
The lib/factorio library is intended to abstract all the interfacing
that happens with Factorio.
Add symlinkMods function which takes an instance and a shared mods
folder as input and updates or creates the instance mods folder from it
by symlinking the mods in the shared mods folder to the instance mods
folder.
On Windows this uses hard links as the symlinks require elevated
privileges.
Remove the explicit ignoring of the exit status of the test scripts.
This makes the Travis CI build be considered a failure if one of the
tests fail. Also rewrite the fast-test script to use the test script.
Update old dependencies. Fix change in mocha causing it to not exist
afer the tests are done and a change in the command parsing causing the
tests to no longer be detected.
Update instructions, Dockerfile and Travis CI to use Node.js 10.
Specify that Node.js version 10 or greater is needed in the engines
section of package.json (note that this is only advisory.) And document
this as a breaking change in CHANGELOG.md.
Do not install git, tar and curl as these packages are installed by
default on Travis CI. Move the codecov upload to the travis script and
do not include the codecov token as it's not needed when uploaded from
Travis CI. Make the cover npm script into something that can be runned
locally and move the Travis CI version to a new ci-cover script. Remove
the verbose flag from the tar extration of the factorio headless server.
Use nyc instead of istanbul as the later has been deprecated and is no
longer being developed. Fix the cover and test scripts to work again
with nyc and add the output dir for nyc into .gitignore.