Download packages/knowledge-fabric/src/SnapshotService.ts from AnthropicallyHuggingFaces/ProjectOS: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/packages/knowledge-fabric/src/SnapshotService.ts
- Command line
-
hf download hf://spaces/AnthropicallyHuggingFaces/ProjectOS/packages/knowledge-fabric/src/SnapshotService.ts
-
curl -L -o SnapshotService.ts https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/packages/knowledge-fabric/src/SnapshotService.ts
608 Bytes
| 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<SnapshotRepository['create']>[1] = {}) { return this.repository.create(projectId, options); } | |
| get(snapshotId: string) { return this.repository.get(snapshotId); } | |
| restore(snapshotId: string) { return this.repository.restore(snapshotId); } | |
| } | |