File
Blob: src/worker/git/operations/fetch/execute.ts
| 1 | import type { ServeUploadPackPlan } from "./types"; |
| 2 | import type { RewriteOptions } from "@/worker/git/pack/rewrite/shared"; |
| 3 | |
| 4 | import { rewritePack, rewritePackResult, type PackRewriteResult } from "@/worker/git/pack/rewrite"; |
| 5 | |
| 6 | export async function resolvePackStreamResult( |
| 7 | env: Env, |
| 8 | plan: ServeUploadPackPlan, |
| 9 | options?: RewriteOptions |
| 10 | ): Promise<PackRewriteResult> { |
| 11 | return await rewritePackResult(env, plan.snapshot, plan.neededOids, options); |
| 12 | } |
| 13 | |
| 14 | export async function resolvePackStream( |
| 15 | env: Env, |
| 16 | plan: ServeUploadPackPlan, |
| 17 | options?: RewriteOptions |
| 18 | ): Promise<ReadableStream<Uint8Array> | undefined> { |
| 19 | return await rewritePack(env, plan.snapshot, plan.neededOids, options); |
| 20 | } |