mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
fix(server/test): problematic cyclic dependency
This commit is contained in:
parent
5e28df883d
commit
5bc4bdaeef
@ -14,13 +14,13 @@ import entityConstructor from "../becca/entity_constructor.js";
|
|||||||
import type { AttributeRow, BranchRow, EtapiTokenRow, NoteRow, OptionRow } from "@triliumnext/commons";
|
import type { AttributeRow, BranchRow, EtapiTokenRow, NoteRow, OptionRow } from "@triliumnext/commons";
|
||||||
import type AbstractBeccaEntity from "./entities/abstract_becca_entity.js";
|
import type AbstractBeccaEntity from "./entities/abstract_becca_entity.js";
|
||||||
import ws from "../services/ws.js";
|
import ws from "../services/ws.js";
|
||||||
|
import sql_init from "../services/sql_init.js";
|
||||||
|
|
||||||
const beccaLoaded = new Promise<void>(async (res, rej) => {
|
export const beccaLoaded = new Promise<void>(async (res, rej) => {
|
||||||
const sqlInit = (await import("../services/sql_init.js")).default;
|
|
||||||
// We have to import async since options init requires keyboard actions which require translations.
|
// We have to import async since options init requires keyboard actions which require translations.
|
||||||
const options_init = (await import("../services/options_init.js")).default;
|
const options_init = (await import("../services/options_init.js")).default;
|
||||||
|
|
||||||
sqlInit.dbReady.then(() => {
|
sql_init.dbReady.then(() => {
|
||||||
cls.init(() => {
|
cls.init(() => {
|
||||||
load();
|
load();
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import password from "./encryption/password.js";
|
|||||||
import backup from "./backup.js";
|
import backup from "./backup.js";
|
||||||
import eventService from "./events.js";
|
import eventService from "./events.js";
|
||||||
|
|
||||||
const dbReady = deferred<void>();
|
export const dbReady = deferred<void>();
|
||||||
|
|
||||||
function schemaExists() {
|
function schemaExists() {
|
||||||
return !!sql.getValue(/*sql*/`SELECT name FROM sqlite_master
|
return !!sql.getValue(/*sql*/`SELECT name FROM sqlite_master
|
||||||
|
Loading…
x
Reference in New Issue
Block a user