From cf3ae6af402559ae2bd62a265a4531f1aa3c95b2 Mon Sep 17 00:00:00 2001 From: barthofu Date: Tue, 14 Jan 2025 00:30:49 +0000 Subject: [PATCH 1/2] fix: missing env variables error --- src/utils/types/environment.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/types/environment.ts b/src/utils/types/environment.ts index 9957ab00..c35a13b8 100644 --- a/src/utils/types/environment.ts +++ b/src/utils/types/environment.ts @@ -25,9 +25,10 @@ export const env = cleanEnv(process.env, { export function checkEnvironmentVariables() { const config = mikroORMConfig[env.NODE_ENV] + // @ts-expect-error const isSqliteDatabase = !!config.dbName && !config.port - if (isSqliteDatabase) { + if (!isSqliteDatabase) { cleanEnv(process.env, { DATABASE_HOST: str(), DATABASE_PORT: num(), From a3a69306bbd6f2b6c5c3b279917bfc35cba38841 Mon Sep 17 00:00:00 2001 From: barthofu Date: Tue, 14 Jan 2025 00:31:12 +0000 Subject: [PATCH 2/2] fix(plugins): import prefix --- src/utils/classes/Plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/classes/Plugin.ts b/src/utils/classes/Plugin.ts index 57dca5da..18833e23 100644 --- a/src/utils/classes/Plugin.ts +++ b/src/utils/classes/Plugin.ts @@ -25,12 +25,12 @@ export class Plugin { private _translations: { [key: string]: BaseTranslation } constructor(path: string) { - this._path = path + this._path = path.replace('file://', '') } public async load(): Promise { // check if the plugin.json is present - if (!await fs.existsSync(`${this._path}/plugin.json`)) + if (!fs.existsSync(`${this._path}/plugin.json`)) return this.stopLoad('plugin.json not found') // read plugin.json