refactor: consume Commonlib as a package

This commit is contained in:
vorotamoroz
2026-07-17 11:13:16 +00:00
parent 6475d32769
commit a721d3b602
665 changed files with 3438 additions and 31592 deletions
+10 -3
View File
@@ -10,9 +10,9 @@
*/
import { LiveSyncWebApp } from "./main";
import type { ObsidianLiveSyncSettings } from "@lib/common/types";
import type { FilePathWithPrefix } from "@lib/common/types";
import { compatGlobal } from "@lib/common/coreEnvFunctions.ts";
import type { ObsidianLiveSyncSettings } from "@vrtmrz/livesync-commonlib/compat/common/types";
import type { FilePathWithPrefix } from "@vrtmrz/livesync-commonlib/compat/common/types";
import { compatGlobal } from "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions";
// --------------------------------------------------------------------------
// Internal state one app instance per page / browser context
@@ -29,10 +29,17 @@ function stripPrefix(raw: string): string {
}
interface TestCore {
serviceModules: {
databaseFileAccess: {
storeContent(path: FilePathWithPrefix, content: string): Promise<unknown>;
delete(path: FilePathWithPrefix): Promise<unknown>;
};
};
services?: {
replication?: {
databaseQueueCount?: { value: number };
storageApplyingCount?: { value: number };
replicate(showMessage: boolean): Promise<unknown>;
};
fileProcessing?: {
totalQueued?: { value: number };