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