Flatten lib namespace

Move all functions and classes currently available through lib/name and
libName to be under a single flat namespace in lib.  This make
reorganising the lib namespace much simpler as the location of symbols
can move without breaking the consumers of lib.

The multi-entrypoint design was already problematic for the web plugin
system which couldn't effectively use it due to how webpack's shared
module system is awkward to set up with multiple entrypoints per package.
This commit is contained in:
Hornwitser committed 2023-07-28 16:03:29 +02:00
1 parent bb58670597
commit bfe119eaa3
143 files changed
+1798 -1918

No files matched your search

+7 -7
View File
@@ -21,7 +21,7 @@ const { LineSplitter } = require("../stream");
* reading the changelog.txt in it.
*
* @param {string} changelogPath - Path to changelog.txt.
* @memberof module:lib/factorio
* @memberof module:lib
* @private
* @inner
*/
@@ -55,7 +55,7 @@ async function getVersion(changelogPath) {
* @param {string} a - Version to compare.
* @param {string} b - Version to compare.
* @returns {number} 1 if a < b, 0 if a = b and -1 if a > b.
* @memberof module:lib/factorio
* @memberof module:lib
* @private
* @inner
*/
@@ -87,7 +87,7 @@ function versionOrder(a, b) {
* Version to look for, supports the special value "latest" for the
* latest version available.
* @returns {Promise<Array>} Array with path to data dir and version found.
* @memberof module:lib/factorio
* @memberof module:lib
* @private
* @inner
*/
@@ -145,7 +145,7 @@ async function findVersion(factorioDir, targetVersion) {
* RFC 6335.
*
* @return {number} a number in the range 49152 to 65535.
* @memberof module:lib/factorio
* @memberof module:lib
* @private
* @inner
*/
@@ -164,7 +164,7 @@ function randomDynamicPort() {
*
* @param {number} length - the length of the password to generate.
* @return {Promise<string>} password of the given length
* @memberof module:lib/factorio
* @memberof module:lib
* @private
* @inner
*/
@@ -207,7 +207,7 @@ async function generatePassword(length) {
* @param {string} source - Passed into the output structure as source
*
* @returns {object} - An object with interpeted data.
* @memberof module:lib/factorio
* @memberof module:lib
* @private
* @inner
*/
@@ -412,7 +412,7 @@ const outputHeuristics = [
* - save-finished - invoked when the server has finished a manual save
* - exit - invoked when the sterver has exited
* @extends events.EventEmitter
* @memberof module:lib/factorio
* @memberof module:lib
*/
class FactorioServer extends events.EventEmitter {
/**