"use strict";(()=>{var e={};e.id=9578,e.ids=[9578],e.modules={85890:e=>{e.exports=require("better-sqlite3")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},78893:e=>{e.exports=require("buffer")},61282:e=>{e.exports=require("child_process")},84770:e=>{e.exports=require("crypto")},17702:e=>{e.exports=require("events")},92048:e=>{e.exports=require("fs")},20629:e=>{e.exports=require("fs/promises")},32615:e=>{e.exports=require("http")},35240:e=>{e.exports=require("https")},98216:e=>{e.exports=require("net")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},76162:e=>{e.exports=require("stream")},82452:e=>{e.exports=require("tls")},17360:e=>{e.exports=require("url")},21764:e=>{e.exports=require("util")},71568:e=>{e.exports=require("zlib")},11303:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>h,patchFetch:()=>j,requestAsyncStorage:()=>q,routeModule:()=>x,serverHooks:()=>m,staticGenerationAsyncStorage:()=>b});var s={};t.r(s),t.d(s,{GET:()=>l});var o=t(49303),i=t(88716),p=t(60670),u=t(87070),n=t(94925),a=t(98838),c=t(11796);let d=(0,t(43895).h)("api/repositories-clone");async function l(e,{params:r}){try{let{jobId:e}=await r;if(!e)return u.NextResponse.json({success:!1,error:"Job ID is required"},{status:400});let t=(0,n.getDbInstance)(),{CM_ROOT_DIR:s}=(0,a.dU)(),o=new c.v9(t,{basePath:s}).getCloneJobStatus(e);if(!o)return u.NextResponse.json({success:!1,error:"Clone job not found"},{status:404});let i={success:!0,jobId:o.jobId,status:o.status,progress:o.progress,repositoryId:o.repositoryId};return o.error&&(i.error=o.error),u.NextResponse.json(i,{status:200})}catch(e){return d.error("unexpected-error:",{error:e instanceof Error?e.message:String(e)}),u.NextResponse.json({success:!1,error:"Failed to get clone job status"},{status:500})}}let x=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/repositories/clone/[jobId]/route",pathname:"/api/repositories/clone/[jobId]",filename:"route",bundlePath:"app/api/repositories/clone/[jobId]/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/repositories/clone/[jobId]/route.ts",nextConfigOutput:"",userland:s}),{requestAsyncStorage:q,staticGenerationAsyncStorage:b,serverHooks:m}=x,h="/api/repositories/clone/[jobId]/route";function j(){return(0,p.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:b})}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8948,5972,3853,4893,2509,3895,4925,721,9228,550,3112,1796],()=>t(11303));module.exports=s})();