2025-09-19 09:11:29 +00:00
|
|
|
import { Plugin } from "../plugin"
|
|
|
|
|
import { LSP } from "../lsp"
|
2025-10-02 04:18:11 +00:00
|
|
|
import { File } from "../file"
|
2025-11-01 06:14:09 +00:00
|
|
|
import { Project } from "./project"
|
|
|
|
|
import { Bus } from "../bus"
|
|
|
|
|
import { Command } from "../command"
|
|
|
|
|
import { Instance } from "./instance"
|
2025-11-09 01:17:46 +00:00
|
|
|
import { Log } from "@/util/log"
|
2025-11-22 01:41:27 +00:00
|
|
|
import { ShareNext } from "@/share/share-next"
|
2025-09-19 09:11:29 +00:00
|
|
|
|
|
|
|
|
export async function InstanceBootstrap() {
|
2025-11-09 01:17:46 +00:00
|
|
|
Log.Default.info("bootstrapping", { directory: Instance.directory })
|
2025-09-19 09:11:29 +00:00
|
|
|
await Plugin.init()
|
2025-11-22 01:41:27 +00:00
|
|
|
ShareNext.init()
|
2025-10-31 04:57:58 +00:00
|
|
|
await LSP.init()
|
2025-10-02 04:18:11 +00:00
|
|
|
File.init()
|
2025-11-01 06:14:09 +00:00
|
|
|
|
|
|
|
|
Bus.subscribe(Command.Event.Executed, async (payload) => {
|
|
|
|
|
if (payload.properties.name === Command.Default.INIT) {
|
2026-03-18 17:34:36 +00:00
|
|
|
Project.setInitialized(Instance.project.id)
|
2025-11-01 06:14:09 +00:00
|
|
|
}
|
|
|
|
|
})
|
2025-09-19 09:11:29 +00:00
|
|
|
}
|