chore(jsdoc):Linting fixes (#3703)

* fixed the lockfile having a different version

* jsdoc
This commit is contained in:
Frank Elsinga
2023-09-07 09:42:44 +02:00
committed by GitHub
parent d243cd84bf
commit d6302198f3
11 changed files with 117 additions and 54 deletions

View File

@@ -134,7 +134,10 @@ class Database {
}
/**
*
* Read the database config
* @throws {Error} If the config is invalid
* @typedef {string|undefined} envString
* @returns {{type: "sqlite"} | {type:envString, hostname:envString, port:envString, database:envString, username:envString, password:envString}} Database config
*/
static readDBConfig() {
let dbConfig;
@@ -153,7 +156,9 @@ class Database {
}
/**
* @param dbConfig
* @typedef {string|undefined} envString
* @param {{type: "sqlite"} | {type:envString, hostname:envString, port:envString, database:envString, username:envString, password:envString}} dbConfig the database configuration that should be written
* @returns {void}
*/
static writeDBConfig(dbConfig) {
fs.writeFileSync(path.join(Database.dataDir, "db-config.json"), JSON.stringify(dbConfig, null, 4));
@@ -161,10 +166,8 @@ class Database {
/**
* Connect to the database
* @param {boolean} testMode Should the connection be
* started in test mode?
* @param {boolean} autoloadModels Should models be
* automatically loaded?
* @param {boolean} testMode Should the connection be started in test mode?
* @param {boolean} autoloadModels Should models be automatically loaded?
* @param {boolean} noLog Should logs not be output?
* @returns {Promise<void>}
*/
@@ -292,8 +295,9 @@ class Database {
}
/**
* @param testMode
* @param noLog
@param {boolean} testMode Should the connection be started in test mode?
@param {boolean} noLog Should logs not be output?
@returns {Promise<void>}
*/
static async initSQLite(testMode, noLog) {
await R.exec("PRAGMA foreign_keys = ON");
@@ -321,7 +325,8 @@ class Database {
}
/**
*
* Initialize MariaDB
* @returns {Promise<void>}
*/
static async initMariaDB() {
log.debug("db", "Checking if MariaDB database exists...");
@@ -368,6 +373,7 @@ class Database {
/**
* Patch the database for SQLite
* @returns {Promise<void>}
* @deprecated
*/
static async patchSqlite() {
@@ -650,7 +656,7 @@ class Database {
}
/**
*
* @returns {string} Get the SQL for the current time plus a number of hours
*/
static sqlHourOffset() {
if (Database.dbConfig.type === "sqlite") {