Skip to content
File

Blob: src/worker/git/operations/fetch/types.ts

typescript29 lines
1import type { CacheContext } from "@/worker/cache";
2import type { IdxView } from "@/worker/git/object-store/types";
3 
4export type OrderedPackSnapshotEntry = {
5 packKey: string;
6 packBytes: number;
7 idx: IdxView;
8};
9 
10export type OrderedPackSnapshot = {
11 packs: OrderedPackSnapshotEntry[];
12};
13 
14export type ServeUploadPackPlan = {
15 type: "Serve";
16 repoId: string;
17 snapshot: OrderedPackSnapshot;
18 neededOids: string[];
19 ackOids: string[];
20 signal?: AbortSignal;
21 cacheCtx?: CacheContext;
22};
23 
24export type UploadPackPlan =
25 | ServeUploadPackPlan
26 | {
27 type: "RepositoryNotReady";
28 };