Release 2.24.0 (#3141)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Karsten Hassel <hassel@gmx.de>
Co-authored-by: Malte Hallström <46646495+SkySails@users.noreply.github.com>
Co-authored-by: Veeck <github@veeck.de>
Co-authored-by: veeck <michael@veeck.de>
Co-authored-by: dWoolridge <dwoolridge@charter.net>
Co-authored-by: Johan <jojjepersson@yahoo.se>
Co-authored-by: Dario Mratovich <dario_mratovich@hotmail.com>
Co-authored-by: Dario Mratovich <dario.mratovich@outlook.com>
Co-authored-by: Magnus <34011212+MagMar94@users.noreply.github.com>
Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
Co-authored-by: buxxi <buxxi@omfilm.net>
Co-authored-by: Thomas Hirschberger <47733292+Tom-Hirschberger@users.noreply.github.com>
Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
Co-authored-by: Andrés Vanegas Jiménez <142350+angeldeejay@users.noreply.github.com>
Co-authored-by: Dave Child <dave@addedbytes.com>
Co-authored-by: grenagit <46225780+grenagit@users.noreply.github.com>
Co-authored-by: Grena <grena@grenabox.fr>
Co-authored-by: Magnus Marthinsen <magmar@online.no>
Co-authored-by: Patrick <psieg@users.noreply.github.com>
Co-authored-by: Piotr Rajnisz <56397164+rajniszp@users.noreply.github.com>
Co-authored-by: Suthep Yonphimai <tomzt@users.noreply.github.com>
Co-authored-by: CarJem Generations (Carter Wallace) <cwallacecs@gmail.com>
Co-authored-by: Nicholas Fogal <nfogal.misc@gmail.com>
Co-authored-by: JakeBinney <126349119+JakeBinney@users.noreply.github.com>
Co-authored-by: OWL4C <124401812+OWL4C@users.noreply.github.com>
Co-authored-by: Oscar Björkman <17575446+oscarb@users.noreply.github.com>
Co-authored-by: Ismar Slomic <ismar@slomic.no>
Co-authored-by: Jørgen Veum-Wahlberg <jorgen.wahlberg@amedia.no>
Co-authored-by: Eddie Hung <6740044+eddiehung@users.noreply.github.com>
Co-authored-by: Bugsounet - Cédric <github@bugsounet.fr>
Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Michael Teeuw
2023-07-01 21:17:31 +02:00
committed by GitHub
parent abe5c08a52
commit e87f50e64a
74 changed files with 2570 additions and 2437 deletions

View File

@@ -44,7 +44,6 @@ process.on("uncaughtException", function (err) {
/**
* The core app.
*
* @class
*/
function App() {
@@ -53,7 +52,6 @@ function App() {
/**
* Loads the config file. Combines it with the defaults and returns the config
*
* @async
* @returns {Promise<object>} the loaded config or the defaults if something goes wrong
*/
@@ -78,7 +76,7 @@ function App() {
// save current config.js
try {
if (fs.existsSync(configFilename)) {
fs.copyFileSync(configFilename, `${configFilename}_${Date.now()}`);
fs.copyFileSync(configFilename, `${configFilename}-old`);
}
} catch (err) {
Log.warn(`Could not copy ${configFilename}: ${err.message}`);
@@ -135,7 +133,6 @@ function App() {
/**
* Checks the config for deprecated options and throws a warning in the logs
* if it encounters one option from the deprecated.js list
*
* @param {object} userConfig The user config
*/
function checkDeprecatedOptions(userConfig) {
@@ -150,7 +147,6 @@ function App() {
/**
* Loads a specific module.
*
* @param {string} module The name of the module (including subpath).
*/
function loadModule(module) {
@@ -204,36 +200,21 @@ function App() {
/**
* Loads all modules.
*
* @param {string[]} modules All modules to be loaded
* @param {Module[]} modules All modules to be loaded
* @returns {Promise} A promise that is resolved when all modules been loaded
*/
async function loadModules(modules) {
return new Promise((resolve) => {
Log.log("Loading module helpers ...");
Log.log("Loading module helpers ...");
/**
*
*/
function loadNextModule() {
if (modules.length > 0) {
const nextModule = modules[0];
loadModule(nextModule);
modules = modules.slice(1);
loadNextModule();
} else {
// All modules are loaded
Log.log("All module helpers loaded.");
resolve();
}
}
for (let module of modules) {
await loadModule(module);
}
loadNextModule();
});
Log.log("All module helpers loaded.");
}
/**
* Compare two semantic version numbers and return the difference.
*
* @param {string} a Version number a.
* @param {string} b Version number b.
* @returns {number} A positive number if a is larger than b, a negative
@@ -259,7 +240,6 @@ function App() {
* Start the core app.
*
* It loads the config, then it loads all modules.
*
* @async
* @returns {Promise<object>} the config used
*/
@@ -274,6 +254,7 @@ function App() {
modules.push(module.module);
}
}
await loadModules(modules);
httpServer = new Server(config);
@@ -312,7 +293,6 @@ function App() {
* exists.
*
* Added to fix #1056
*
* @returns {Promise} A promise that is resolved when all node_helpers and
* the http server has been closed
*/