Simplify API

This commit is contained in:
Andras Schmelczer 2025-02-20 22:22:20 +00:00
commit eb1ad9921a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
5 changed files with 203 additions and 53 deletions

View file

@ -1,19 +1,6 @@
export { applyRemoteChangesLocally } from "./sync-operations/apply-remote-changes-locally";
export {
Database,
type RelativePath,
type DocumentId,
type VaultUpdateId,
type DocumentMetadata
} from "./persistence/database";
export { Settings, type SyncSettings } from "./persistence/settings";
export {
SyncService,
type CheckConnectionResult
} from "./services/sync-service";
export { type CheckConnectionResult } from "./services/sync-service";
export { Syncer } from "./sync-operations/syncer";
@ -25,26 +12,17 @@ export {
type HistoryStats,
type HistoryEntry
} from "./tracing/sync-history";
export { Logger, LogLevel } from "./tracing/logger";
export { SyncClient } from "./sync-client";
export { type FileOperations } from "./file-operations";
import init from "sync_lib";
import wasmBin from "sync_lib/sync_lib_bg.wasm";
export { type RelativePath } from "./persistence/database";
export type { PersistenceProvider } from "./persistence/persistence";
export {
isFileTypeMergable,
mergeText,
bytesToBase64,
base64ToBytes,
merge,
isBinary
merge
} from "sync_lib";
export const initialize = async (): Promise<void> => {
await init(
// eslint-disable-next-line
(wasmBin as any).default // it is loaded as a base64 string by webpack
);
};