import { SnapshotRepository } from '@projectos/storage-fabric/sqlite/repositories'; import type { DatabaseSync } from 'node:sqlite'; export class SnapshotService { readonly repository: SnapshotRepository; constructor(db: DatabaseSync, repository = new SnapshotRepository(db)) { this.repository = repository; } capture(projectId: string, options: Parameters[1] = {}) { return this.repository.create(projectId, options); } get(snapshotId: string) { return this.repository.get(snapshotId); } restore(snapshotId: string) { return this.repository.restore(snapshotId); } }