From 05b9e2ec2ac4d155baca41cd9c7f3cea19b1f0b3 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 6 Jan 2026 12:20:01 +0200 Subject: [PATCH] chore(core): fix references to core --- packages/trilium-core/src/becca/entities/bnote.ts | 2 +- packages/trilium-core/src/services/blob.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/trilium-core/src/becca/entities/bnote.ts b/packages/trilium-core/src/becca/entities/bnote.ts index 4f7b70a3c..20d7dd970 100644 --- a/packages/trilium-core/src/becca/entities/bnote.ts +++ b/packages/trilium-core/src/becca/entities/bnote.ts @@ -1,6 +1,6 @@ import type { AttachmentRow, AttributeType, CloneResponse, NoteRow, NoteType, RevisionRow } from "@triliumnext/commons"; import { dayjs } from "@triliumnext/commons"; -import { events as eventService } from "@triliumnext/core"; +import eventService from "../../services/events"; import cloningService from "../../services/cloning.js"; import dateUtils from "../../services/utils/date"; diff --git a/packages/trilium-core/src/services/blob.ts b/packages/trilium-core/src/services/blob.ts index 06e76d5bd..bdf04e01c 100644 --- a/packages/trilium-core/src/services/blob.ts +++ b/packages/trilium-core/src/services/blob.ts @@ -1,10 +1,9 @@ -import { binary_utils } from "@triliumnext/core"; - import becca from "../becca/becca.js"; import { NotFoundError } from "../errors"; import type { Blob } from "./blob-interface.js"; import protectedSessionService from "./protected_session.js"; import { hash } from "./utils.js"; +import { decodeUtf8 } from "./utils/binary.js"; function getBlobPojo(entityName: string, entityId: string, opts?: { preview: boolean }) { // TODO: Unused opts. @@ -41,7 +40,7 @@ function processContent(content: Uint8Array | string | null, isProtected: boolea if (isStringContent) { if (content === null) return ""; if (typeof content === "string") return content; - return binary_utils.decodeUtf8(content as Uint8Array); + return decodeUtf8(content as Uint8Array); } // see https://github.com/zadam/trilium/issues/3523 // IIRC a zero-sized buffer can be returned as null from the database