From 00ca0e6e32e51d681788dec592b758bffd605ad6 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 18 Apr 2025 23:56:52 +0300 Subject: [PATCH] chore(monorepo/electron): rewrite server imports --- _regroup/package.json | 1 - apps/electron/src/electron-main.ts | 2 +- apps/electron/src/electron.ts | 10 +++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/_regroup/package.json b/_regroup/package.json index 4cf22f3a4..a840606d1 100644 --- a/_regroup/package.json +++ b/_regroup/package.json @@ -62,7 +62,6 @@ "@electron/rebuild": "3.7.2", "@playwright/test": "1.51.1", "@stylistic/eslint-plugin": "4.2.0", - "@types/electron-squirrel-startup": "1.0.2", "@types/express": "5.0.1", "@types/node": "22.14.1", "@types/yargs": "17.0.33", diff --git a/apps/electron/src/electron-main.ts b/apps/electron/src/electron-main.ts index 424209012..d6d1f1f14 100644 --- a/apps/electron/src/electron-main.ts +++ b/apps/electron/src/electron-main.ts @@ -1,4 +1,4 @@ -import { initializeTranslations } from "./src/services/i18n.js"; +import { initializeTranslations } from "@triliumnext/server/src/services/i18n.js"; await initializeTranslations(); await import("./electron.js"); diff --git a/apps/electron/src/electron.ts b/apps/electron/src/electron.ts index 00a96bdb0..d866d0847 100644 --- a/apps/electron/src/electron.ts +++ b/apps/electron/src/electron.ts @@ -3,10 +3,10 @@ import electron from "electron"; import electronDebug from "electron-debug"; import electronDl from "electron-dl"; -import sqlInit from "./src/services/sql_init.js"; -import windowService from "./src/services/window.js"; -import tray from "./src/services/tray.js"; -import options from "./src/services/options.js"; +import sqlInit from "@triliumnext/server/src/services/sql_init.js"; +import windowService from "@triliumnext/server/src/services/window.js"; +import tray from "@triliumnext/server/src/services/tray.js"; +import options from "@triliumnext/server/src/services/options.js"; // Prevent Trilium starting twice on first install and on uninstall for the Windows installer. if ((await import("electron-squirrel-startup")).default) { @@ -64,4 +64,4 @@ electron.app.on("will-quit", () => { // this is to disable electron warning spam in the dev console (local development only) process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true"; -await import("./src/main.js"); +await import("@triliumnext/server/src/main.js");