mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-27 16:49:51 -07:00
04095eebf7
Move snapshot/merge/quiescence engine and ssh helpers from launcher/sync into src/core/services/stats-sync, parameterized on a minimal SyncDb driver. The launcher binds it to bun:sqlite via launcher/sync/bun-driver; the sync command becomes a thin adapter over the shared sync flow.
13 lines
676 B
TypeScript
13 lines
676 B
TypeScript
import { mergeSnapshotIntoDb as mergeSnapshotIntoDbWith } from '../../src/core/services/stats-sync/merge.js';
|
|
import { openBunSyncDb } from './bun-driver.js';
|
|
import type { SyncMergeSummary } from './sync-shared.js';
|
|
|
|
export type { SyncMergeSummary } from './sync-shared.js';
|
|
export { createDbSnapshot, findLiveStatsDaemonPid } from './sync-shared.js';
|
|
export { formatMergeSummary } from '../../src/core/services/stats-sync/merge.js';
|
|
|
|
/** bun:sqlite binding of the shared snapshot-merge engine. */
|
|
export function mergeSnapshotIntoDb(localDbPath: string, snapshotPath: string): SyncMergeSummary {
|
|
return mergeSnapshotIntoDbWith(openBunSyncDb, localDbPath, snapshotPath);
|
|
}
|