mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-06 08:18:18 +00:00
Use document views in file processing and history
Replace broad entry inputs with the information used by file processing, history, and JSON comparison. Separate customisation content and save-base results from database-document models, and keep content fields out of logical-deletion Metadata while preserving the parent revision. Record the accepted design, compatibility boundaries, and verification. Requires Commonlib commit 751b29a74340da57122b8ab11b80d00c40272120. The registry dependency remains at 0.2.3 pending publication and adoption.
This commit is contained in:
1 parent
0fe7d82f46
commit
80ce481575
17 files changed
+1036
-159
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
LOG_LEVEL_NOTICE,
|
||||
LOG_LEVEL_VERBOSE,
|
||||
} from "@vrtmrz/livesync-commonlib/compat/common/types";
|
||||
import type { FileContentView } from "@vrtmrz/livesync-commonlib/documents";
|
||||
import { Logger } from "@vrtmrz/livesync-commonlib/compat/common/logger";
|
||||
import { isErrorOfMissingDoc } from "@vrtmrz/livesync-commonlib/compat/pouchdb/utils_couchdb";
|
||||
import { fireAndForget, getDocData } from "@vrtmrz/livesync-commonlib/compat/common/utils";
|
||||
@@ -42,7 +43,7 @@ function isComparableTextDecode(path: string) {
|
||||
const ext = path.split(".").splice(-1)[0].toLowerCase();
|
||||
return ["json"].includes(ext);
|
||||
}
|
||||
function readDocument(w: LoadedEntry) {
|
||||
function readDocument(w: FileContentView) {
|
||||
if (w.data.length == 0) return "";
|
||||
if (isImage(w.path)) {
|
||||
return new Uint8Array(decodeBinary(w.data));
|
||||
|
||||
Reference in new issue
Block a user