Mave the ignore entry for packages/master/static out of
packages/master/.gitignore to avoid npm using it and causing the web
build to be excluded from the package.
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.
Fix the path to plugin modules using the old plugins dir instead of
resolving to the actual path of the plugin, which in turn caused no
plugin modules to be loaded.
Avoid any potential for accidentally installing multiple copies of
clusterio/lib by specifiying it as a peer dependency instead of a
regular dependency.
Fix the plugin add command not storing the resolved path for relative
paths passed to it into plugin-list.json and incorrectly resolving any
path containing ./ or ../ instead of only paths starting with these.
Check if the additional file to add exists before trying to pack it.
Note that there may be other ways reading the files could break, but
this should suffice for most cases of getting it wrong.
Move the export and clusterio mod code to the slave package and fix the
path used for them. Refactor tests to use temp/tests/ as the cwd when
running integration tests in order to ensure paths to lua code are
correctly handled.
Add a separate plugin-list.json file for storing which plugins are
available and the path to pass to require in order to load it. This
allows plugins to be published and installed as npm packages. And also
replaces the old method of installing plugins by putting them in the
plugins folder.
Move the code generating the master authentication secret from the
inital value function of the master.auth_secret config entry to the
master startup. Having the authentication secret generated in the
config library poses issues with using the config library in browser.
Send the status of the instance in the repsonse to the listInstances
request and use this status in the integration tests to check if the
instance was started/stopped.
Add the statuses unknown and unassigned for when the status has not yet
been set by a slave and replace the initialized status with starting,
creating_save and exporting_data.
Add all routes the web interface is served on to the express app and
serve the index.html file on. Due to the index html not knowing which
path it's hosted under, a path to the root of the web interface is
replaced using string substitution from the master server.
Replace usage of .constructor.name with a separate property to avoid
issue with JavaScript terser mangling the class name during minification
for the web build.
Set up webpack for the master server's web interface and fix the issues
from the imported interface source files. The .jsx files in
package/master/web are bundled together into package/master/static and
served by the master server via express.
Make the config and link libraries compatible with packing for web with
webpack. This would fail due to ws not being web compatible and config
using a node function not available in the web shim for util.
Mark the "should not create the user if not instructed to" and "should
create the user if instructed to" tests as slow as these take more than
2 seconds to execute on travis.
Disable ci mode for lerna in travis environment as this requires
package-lock.json files to be commited to the repository and we do not
for the time being do this.