chore(monorepo/electron): rewrite server imports

This commit is contained in:
Elian Doran 2025-04-18 23:56:52 +03:00
parent 5fd8038cb7
commit 00ca0e6e32
No known key found for this signature in database
3 changed files with 6 additions and 7 deletions

View File

@ -62,7 +62,6 @@
"@electron/rebuild": "3.7.2", "@electron/rebuild": "3.7.2",
"@playwright/test": "1.51.1", "@playwright/test": "1.51.1",
"@stylistic/eslint-plugin": "4.2.0", "@stylistic/eslint-plugin": "4.2.0",
"@types/electron-squirrel-startup": "1.0.2",
"@types/express": "5.0.1", "@types/express": "5.0.1",
"@types/node": "22.14.1", "@types/node": "22.14.1",
"@types/yargs": "17.0.33", "@types/yargs": "17.0.33",

View File

@ -1,4 +1,4 @@
import { initializeTranslations } from "./src/services/i18n.js"; import { initializeTranslations } from "@triliumnext/server/src/services/i18n.js";
await initializeTranslations(); await initializeTranslations();
await import("./electron.js"); await import("./electron.js");

View File

@ -3,10 +3,10 @@
import electron from "electron"; import electron from "electron";
import electronDebug from "electron-debug"; import electronDebug from "electron-debug";
import electronDl from "electron-dl"; import electronDl from "electron-dl";
import sqlInit from "./src/services/sql_init.js"; import sqlInit from "@triliumnext/server/src/services/sql_init.js";
import windowService from "./src/services/window.js"; import windowService from "@triliumnext/server/src/services/window.js";
import tray from "./src/services/tray.js"; import tray from "@triliumnext/server/src/services/tray.js";
import options from "./src/services/options.js"; import options from "@triliumnext/server/src/services/options.js";
// Prevent Trilium starting twice on first install and on uninstall for the Windows installer. // Prevent Trilium starting twice on first install and on uninstall for the Windows installer.
if ((await import("electron-squirrel-startup")).default) { 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) // this is to disable electron warning spam in the dev console (local development only)
process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true"; process.env["ELECTRON_DISABLE_SECURITY_WARNINGS"] = "true";
await import("./src/main.js"); await import("@triliumnext/server/src/main.js");