Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
// Crypto-sync
export {
decryptSyncPayload,
type EncryptSyncPayloadOptions,
encryptSyncPayload,
MAX_SYNC_PAYLOAD_BYTES,
SYNC_PAYLOAD_VERSION,
} from "./crypto-sync/crypto-sync.js";
// Engine
export { SyncEngine, type SyncEngineOptions } from "./engine/engine.js";
// Errors
export {
VAULT_SYNC_CODES,
type VaultSyncCode,
VaultSyncError,
} from "./errors/index.js";
// Merge
export {
assertMergeStrategy,
MERGE_STRATEGIES,
mergeVaultItems,
} from "./merge/merge.js";
// OTel
export {
getVaultSyncInstruments,
getVaultSyncTracer,
resetVaultSyncInstruments,
resetVaultSyncTracer,
setVaultSyncMeterProvider,
setVaultSyncTracerProvider,
type VaultSyncInstruments,
} from "./otel/instruments.js";
// Patch
export {
applyPatch,
diffVaultItems,
type JsonPatch,
} from "./patch/patch.js";
// Queue
export {
collapseOperations,
DEFAULT_MAX_QUEUE_DEPTH,
type EnqueueInput,
SyncQueue,
type SyncQueueOptions,
} from "./queue/queue.js";
// Schemas
export {
EncryptedSyncPayloadSchema,
MergeStrategySchema,
SyncOperationKindSchema,
SyncOperationSchema,
VaultHistoryEntrySchema,
VaultItemSchema,
VaultSnapshotSchema,
VectorClockSchema,
} from "./schemas/schemas.js";
// Types
export type {
EncryptedSyncPayload,
MergeStrategy,
SyncOperation,
SyncOperationKind,
SyncResult,
SyncTransport,
VaultHistoryEntry,
VaultItem,
VaultSnapshot,
VectorClockRelation,
VectorClockState,
} from "./types/types.js";
// Vector clock
export {
compare,
empty,
happensBefore,
increment,
lwwTotalOrder,
merge,
} from "./vector-clock/vector-clock.js";