refactor(client): circular dependency causing test failure

This commit is contained in:
Elian Doran 2025-06-19 22:01:01 +03:00
parent 9418055b69
commit efdf79feaa
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import froca from "../services/froca.js"; import froca from "../services/froca.js";
import bundleService from "../services/bundle.js";
import RootCommandExecutor from "./root_command_executor.js"; import RootCommandExecutor from "./root_command_executor.js";
import Entrypoints, { type SqlExecuteResults } from "./entrypoints.js"; import Entrypoints, { type SqlExecuteResults } from "./entrypoints.js";
import options from "../services/options.js"; import options from "../services/options.js";
@ -470,6 +469,7 @@ export class AppContext extends Component {
this.tabManager.loadTabs(); this.tabManager.loadTabs();
const bundleService = (await import("../services/bundle.js")).default;
setTimeout(() => bundleService.executeStartupBundles(), 2000); setTimeout(() => bundleService.executeStartupBundles(), 2000);
} }

View File

@ -1,4 +1,4 @@
import FrontendScriptApi, { type Entity } from "./frontend_script_api.js"; import type { Entity } from "./frontend_script_api.js";
import utils from "./utils.js"; import utils from "./utils.js";
import froca from "./froca.js"; import froca from "./froca.js";
@ -14,6 +14,8 @@ async function ScriptContext(startNoteId: string, allNoteIds: string[], originEn
throw new Error(`Could not find start note ${startNoteId}.`); throw new Error(`Could not find start note ${startNoteId}.`);
} }
const FrontendScriptApi = (await import("./frontend_script_api.js")).default;
return { return {
modules: modules, modules: modules,
notes: utils.toObject(allNotes, (note) => [note.noteId, note]), notes: utils.toObject(allNotes, (note) => [note.noteId, note]),