Skip to content
File

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

typescript21 lines
1import type { ServeUploadPackPlan } from "./types";
2import type { RewriteOptions } from "@/worker/git/pack/rewrite/shared";
3 
4import { rewritePack, rewritePackResult, type PackRewriteResult } from "@/worker/git/pack/rewrite";
5 
6export 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 
14export 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}