Skip to content

Build your personal knowledge base with Trilium Notes

fix(build-docs): backend script generation fails

Elian Doranca0c64094c66
diff --git a/apps/build-docs/src/backend_script_entrypoint.ts b/apps/build-docs/src/backend_script_entrypoint.ts
index 0447900b6b..7b00ed752b 100644
--- a/apps/build-docs/src/backend_script_entrypoint.ts
+++ b/apps/build-docs/src/backend_script_entrypoint.ts
@@ -14,21 +14,18 @@
*/
export type {
- default as AbstractBeccaEntity
-} from "../../server/src/becca/entities/abstract_becca_entity.js";
-export type {
- default as BAttachment
-} from "../../server/src/becca/entities/battachment.js";
-export type { default as BAttribute } from "../../server/src/becca/entities/battribute.js";
-export type { default as BBranch } from "../../server/src/becca/entities/bbranch.js";
-export type { default as BEtapiToken } from "../../server/src/becca/entities/betapi_token.js";
-export type { BNote };
-export type { default as BOption } from "../../server/src/becca/entities/boption.js";
-export type { default as BRecentNote } from "../../server/src/becca/entities/brecent_note.js";
-export type { default as BRevision } from "../../server/src/becca/entities/brevision.js";
+ AbstractBeccaEntity,
+ BAttachment,
+ BAttribute,
+ BBranch,
+ BEtapiToken,
+ BNote,
+ BOption,
+ BRecentNote,
+ BRevision
+} from "@triliumnext/core";
-import BNote from "../../server/src/becca/entities/bnote.js";
-import BackendScriptApi, { type Api } from "../../server/src/services/backend_script_api.js";
+import { BNote, BackendScriptApi, type BackendScriptApiInterface as Api } from "@triliumnext/core";
export type { Api };
diff --git a/packages/trilium-core/src/index.ts b/packages/trilium-core/src/index.ts
index c42cdd3ddc..064a02be7d 100644
--- a/packages/trilium-core/src/index.ts
+++ b/packages/trilium-core/src/index.ts
@@ -115,6 +115,7 @@ export * as becca_mocking from "./test/becca_mocking";
export { default as markdownImportService } from "./services/import/markdown";
export { default as scriptService } from "./services/script";
+export { default as BackendScriptApi, type Api as BackendScriptApiInterface } from "./services/backend_script_api";
export * as scheduler from "./services/scheduler";
export async function initializeCore({ dbConfig, executionContext, crypto, zip, zipExportProviderFactory, translations, messaging, request, schema, extraAppInfo, platform, getDemoArchive }: {