just-git 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +2 -2
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ interface StandardHooksConfig {
|
|
|
259
259
|
/** Reject deletion and overwrite of tags. Tags are treated as immutable. */
|
|
260
260
|
denyDeleteTags?: boolean;
|
|
261
261
|
/** Return false to reject the entire push (e.g. check Authorization header). */
|
|
262
|
-
|
|
262
|
+
authorizePush?: (request: Request) => boolean | Promise<boolean>;
|
|
263
263
|
/** Called after refs are updated. */
|
|
264
264
|
onPush?: (event: PostReceiveEvent) => void | Promise<void>;
|
|
265
265
|
}
|
package/dist/server/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var M=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(t
|
|
|
5
5
|
|
|
6
6
|
`),n=t===-1?e:e.slice(0,t),s=t===-1?"":e.slice(t+2),a="",i="commit",o="",f;for(let c of n.split(`
|
|
7
7
|
`)){let d=c.indexOf(" ");if(d===-1)continue;let y=c.slice(0,d),l=c.slice(d+1);switch(y){case"object":a=l;break;case"type":i=l;break;case"tag":o=l;break;case"tagger":f=N(l);break}}if(!a)throw new Error("Tag missing object field");if(!o)throw new Error("Tag missing tag name field");if(!f)throw new Error("Tag missing tagger field");return{type:"tag",object:a,objectType:i,name:o,tagger:f,message:s}}async function $(r,e){return r.objectStore.read(e)}async function Ne(r,e){return r.objectStore.exists(e)}var ur=new TextDecoder;async function Be(r,e){let t=await $(r,e);if(t.type!=="commit")throw new Error(`Expected commit object for ${e}, got ${t.type}`);return B(t.content)}var br=new TextEncoder,$e=new TextDecoder;function ne(r){let e=[],t=0;for(;t<r.byteLength;){let n=r.indexOf(32,t);if(n===-1)break;let s=$e.decode(r.subarray(t,n)),a=r.indexOf(0,n+1);if(a===-1)break;let i=$e.decode(r.subarray(n+1,a)),o=r.subarray(a+1,a+21),f=G(o),c=s.padStart(6,"0");e.push({mode:c,name:i,hash:f}),t=a+21}return{type:"tree",entries:e}}async function _e(r,e,t){if(e===t)return!0;let n=new Set,s=[t],a=0;for(;a<s.length;){let i=s[a++];if(i===e)return!0;if(n.has(i))continue;n.add(i);let o=await Be(r,i);for(let f of o.parents)n.has(f)||s.push(f)}return!1}var Y=new Uint32Array([0,2874782929,1454598562,4260027763,104818581,2909197124,1351355959,4225088230,209637162,2804382715,1523426952,4053013081,172075199,2702711918,1559413021,4155209164,419274324,3013880453,1313798134,3843506983,516094401,3046853904,1215402083,3811058866,344150398,3218793903,1110456540,3916008461,314324715,3118826042,1141858121,4015451032,838548648,2594343033,1732793610,3423723995,935615293,2627596268,1635201695,3392046670,1032188802,2531018579,1798740512,3228511985,1002083351,2430804166,1829371317,3327150436,688300796,2187269677,2142620510,3572268943,792315241,2220913080,2039131339,3537049626,628649430,2384582919,1942684788,3633492133,591858243,2283716242,1978950625,3735934768,1677097296,3366964609,893718770,2652677155,1707679429,3465587220,863663975,2552480694,1871230586,3302032043,960225240,2455923465,1773654511,3270403390,1057273933,2489126044,2064377604,3495056341,767069862,2262907511,2100592785,3597481024,730327347,2162056674,2004166702,3693911295,566641036,2325738845,1900695483,3658742634,670639641,2359333576,1376601592,4183093545,79572058,2951190667,1412571757,4285241020,42027983,2849570590,1584630482,4113186307,146858864,2744735649,1481436487,4078262678,251626725,2779131956,1257298860,3785977725,474198542,3071936223,1288682553,3885369576,444388763,2972016970,1183716486,3990331479,272465188,3143944693,1085371155,3957901250,369236657,3176902240,1823819377,3354194592,973483987,2438961922,1787437540,3251868981,1010387014,2539715735,1623951707,3415358858,913891577,2636207144,1727327950,3450690079,809994092,2602447805,1950930981,3742461172,586920327,2309096790,1920450480,3643673441,616879634,2409456323,2016810767,3547309022,780500653,2245839484,2114547866,3578840139,683284792,2212736489,1565424345,4128755208,201134971,2695145386,1534139724,4029196701,230847726,2795225151,1362146803,4201185570,126082129,2899994752,1460654694,4233520823,29146052,2867138325,1169417357,4008333404,318803247,3092855294,1133282072,3906287561,356510394,3194379883,1238182823,3801390966,528368133,3022517972,1341279282,3836475619,423699856,2987954497,256065313,2753203184,1508923011,4071219794,159144116,2720394341,1607414038,4103505351,54390795,2825143514,1435408809,4275514744,84055966,2925208399,1404173884,4175973101,398369141,3169260964,1091422423,3931405318,293717728,3134747185,1194504002,3966442387,465595999,2962872974,1299384317,3861558060,503253450,3064380699,1263296616,3759527097,1052246921,2514597720,1745578539,3276988154,948397084,2480853197,1848905150,3312302447,851889315,2577365106,1685431553,3475771856,888777526,2678071271,1649066644,3373495877,642096605,2367432972,1895232639,3685695662,544930376,2334346905,1992922090,3717211963,708530935,2170742310,2089302869,3620835204,738473314,2271052211,2058837184,3522095121]),wt=new Uint32Array([0,2125799437,1446245579,679924934,121527623,2039184714,1359849868,800622977,243055246,1892260483,1481592389,653946440,155379657,2012727236,1601245954,566506255,486110492,1649169681,1254785495,880779738,466036827,1701972054,1307892880,859962525,310759314,1815146399,1152793433,973282132,364614357,1796125400,1133012510,1027425811,972220984,1195887157,1874927347,292830974,1053603711,1081710450,1761559476,373973945,932073654,1228632251,1639818365,520651888,816844273,1308962300,1719925050,406247735,621518628,1539227433,1933077487,227363810,573948515,1551950446,1946564264,179508901,729228714,1438778791,2101662049,66187628,743012589,1392269536,2054851622,80718891,1944441968,223409277,634790075,1533214902,1960544567,175024442,585661948,1549622769,2107207422,53235443,732600885,1428142648,2057778105,68293556,747947890,1377953663,1864147308,296321377,959403431,1201305002,1747123243,379051046,1041303776,1084500205,1633688546,534068207,928247593,1239863076,1717454501,418080424,812495470,1322816099,1243037256,883039813,472173187,1653729934,1294557967,865878786,454727620,1706014665,1147897030,987669707,307785741,1827491840,1129699713,1038154124,359017802,1808993607,1458457428,677079897,14532511,2120785810,1372591635,795162142,132375256,2035729109,1486025178,640143831,245433617,1880368412,1605151901,555322512,161437782,1999272027,1284643889,841432124,446818554,1679083767,1269580150,890855803,497006013,1663735216,1122936511,1012631218,350048884,1785229945,1171323896,996531189,333647667,1834364734,1349216557,786319648,106470886,2028846571,1465201770,702551143,23511201,2144592044,1578619811,547550126,136587112,1989216101,1495895780,664579817,253393455,1907317282,1969288713,198563332,592642754,1575363279,1918806862,216763203,611147653,1524137864,2065452167,94989450,758102092,1402640449,2082607552,43463117,705815819,1420084486,1771668245,388801304,1068136414,1092573139,1856495186,269680223,949234329,1176570516,1743075739,424679830,836160848,1331948893,1624990940,510543057,921210903,1214099482,1064814657,1103292492,1766079626,401677447,944346374,1190966539,1853514189,282018240,822833871,1337873090,1731757572,428713481,909455240,1216352133,1611062083,515111758,596557149,1564187984,1975339414,185100699,615571482,1510326295,1921193169,204879068,770836435,1397172190,2076308248,91542293,718035604,1417247385,2097131103,38440530,109388409,2016412276,1354159794,772011711,29065022,2131648307,1468566517,691907576,150575351,1984739578,1590324284,545213489,264750512,1903355325,1509175675,658575734,444356453,1690924904,1280287662,855278499,490867234,1677142575,1265762025,902094564,335605227,1790299622,1110645024,1015429421,322875564,1837863073,1158497383,1001940074]),X=64,Rt=4,se=4096,We=65536,Pt=127;function Ot(r){let e=r.byteLength;if(e===0)return null;let t=(e-1)/16|0;if(t===0)return null;let n=t>>>2;n<16&&(n=16),n=kt(n);let s=n-1,a=new Uint32Array(n),i=[],o=-1>>>0;for(let l=t*16-16;l>=0;l-=16){let p=0;for(let u=1;u<=16;u++)p=(p<<8|r[l+u])^Y[p>>>23];if(p=p>>>0,p===o)i[i.length-1].ptr=l+16;else{o=p;let u=p&s;i.push({ptr:l+16,val:p}),a[u]++}}let f=new Map;for(let l of i){let p=l.val&s,u=f.get(p);u||(u=[],f.set(p,u)),u.push(l)}for(let[l,p]of f){if(p.length<=X)continue;let u=[],h=p.length/X;for(let b=0;b<X;b++)u.push(p[Math.floor(b*h)]);f.set(l,u),a[l]=X}let c=new Uint32Array(n+1),d=[],y=0;for(let l=0;l<n;l++){c[l]=y;let p=f.get(l);if(p){for(let u of p)d.push(u);y+=p.length}}return c[n]=y,{src:r,hashMask:s,buckets:c,entries:d}}function jt(r,e,t){if(!r||e.byteLength===0)return null;let n=r.src.byteLength,s=e.byteLength,a=r.src,i=new Uint8Array(Math.max(s,1024)),o=0;function f(h){for(;o+h>i.length;){let b=new Uint8Array(i.length*2);b.set(i),i=b}}o=Ge(i,o,n),o=Ge(i,o,s),f(18),o++;let c=0,d=0,y=Math.min(16,s);for(let h=0;h<y;h++)i[o++]=e[h],c=(c<<8|e[h])^Y[c>>>23],d++;c=c>>>0;let l=y,p=0,u=0;for(;l<s;){if(u<se){c^=wt[e[l-16]],c=((c<<8|e[l])^Y[c>>>23])>>>0;let h=c&r.hashMask,b=r.buckets[h],m=r.buckets[h+1];for(let P=b;P<m;P++){let x=r.entries[P];if(x.val!==c)continue;let g=x.ptr,O=a.byteLength-g,L=s-l;if(O>L&&(O=L),O<=u)break;let E=0;for(;E<O&&a[g+E]===e[l+E];)E++;if(E>u&&(u=E,p=g,u>=se))break}}if(u<Rt)f(2),d===0&&o++,i[o++]=e[l++],d++,d===Pt&&(i[o-d-1]=d,d=0),u=0;else{if(d>0){for(;p>0&&a[p-1]===e[l-1];)if(u++,p--,l--,o--,!(--d>0)){o--,d=-1;break}d>0&&(i[o-d-1]=d),d=0}let h=u>We?u-We:0;u-=h,f(8);let b=o++,m=128;if(p&255&&(i[o++]=p&255,m|=1),p&65280&&(i[o++]=p>>>8&255,m|=2),p&16711680&&(i[o++]=p>>>16&255,m|=4),p&4278190080&&(i[o++]=p>>>24&255,m|=8),u&255&&(i[o++]=u&255,m|=16),u&65280&&(i[o++]=u>>>8&255,m|=32),i[b]=m,l+=u,p+=u,u=h,p>4294967295&&(u=0),u<se){c=0;for(let P=-16;P<0;P++)c=(c<<8|e[l+P])^Y[c>>>23];c=c>>>0}}if(t&&o>t)return null}return d>0&&(i[o-d-1]=d),t&&o>t?null:i.subarray(0,o)}var Me={blob:0,tree:1,commit:2,tag:3};function Fe(r,e){let t=e?.window??10,n=e?.depth??50,s=r.slice().sort((c,d)=>{let y=Me[c.type]??99,l=Me[d.type]??99;return y!==l?y-l:d.content.byteLength-c.content.byteLength}),a=new Map,i=[],o=[],f=[];for(let c=0;c<s.length;c++){let d=s[c],y={hash:d.hash,type:d.type,content:d.content,depth:0},l=null,p=null,u=Math.max(0,c-t);for(let h=c-1;h>=u;h--){let b=s[h];if(b.type!==d.type||(a.get(b.hash)?.depth??0)>=n||d.content.byteLength<b.content.byteLength>>>5)continue;let x=o[h-u]??null;if(!x)continue;let g=l?l.byteLength:d.content.byteLength/2|0;if(g<16)continue;let O=jt(x,d.content,g);O&&(!l||O.byteLength<l.byteLength)&&(l=O,p=b.hash)}if(l&&p){y.delta=l,y.deltaBase=p;let h=a.get(p);y.depth=(h?.depth??0)+1}a.set(d.hash,y),i.push(y),o.length>=t&&(o.shift(),f.shift()),o.push(Ot(d.content)),f.push(d.hash)}return i}function kt(r){let e=r;return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e<16?16:e}function Ge(r,e,t){let n=t;do{let s=n&127;n>>>=7,n>0&&(s|=128),r[e++]=s}while(n>0);return e}async function oe(r,e,t){let n=new Set;for(let i of t)await _(r,i,n);let s=[],a=new Set;for(let i of e)await W(r,i,n,a,s);return{count:s.length,objects:Et(s)}}async function qe(r,e,t){let{count:n,objects:s}=await oe(r,e,t);return{count:n,objects:vt(r,s)}}async function*Et(r){for(let e of r)yield e}async function*vt(r,e){for await(let t of e){let n=await $(r,t.hash);yield{hash:t.hash,type:t.type,content:n.content}}}async function ze(r){let e=[];for await(let t of r.objects)e.push(t);return e}async function _(r,e,t){if(t.has(e)||(t.add(e),!await Ne(r,e)))return;let n=await $(r,e);switch(n.type){case"commit":{let s=B(n.content);await _(r,s.tree,t);for(let a of s.parents)await _(r,a,t);break}case"tree":{let s=ne(n.content);for(let a of s.entries)await _(r,a.hash,t);break}case"tag":{let s=j(n.content);await _(r,s.object,t);break}case"blob":break}}async function W(r,e,t,n,s){if(n.has(e)||t.has(e))return;n.add(e);let a=await $(r,e);switch(s.push({hash:e,type:a.type}),a.type){case"commit":{let i=B(a.content);await W(r,i.tree,t,n,s);for(let o of i.parents)await W(r,o,t,n,s);break}case"tree":{let i=ne(a.content);for(let o of i.entries)await W(r,o.hash,t,n,s);break}case"tag":{let i=j(a.content);await W(r,i.object,t,n,s);break}case"blob":break}}var At=new TextEncoder,Xe=new TextDecoder,Ke=65520,It=new Uint8Array([48,48,48,48]);function R(r){let e=typeof r=="string"?At.encode(r):r,t=4+e.byteLength;if(t>Ke)throw new Error(`pkt-line too long: ${t} bytes (max ${Ke})`);let n=t.toString(16).padStart(4,"0"),s=new Uint8Array(t);return s[0]=n.charCodeAt(0),s[1]=n.charCodeAt(1),s[2]=n.charCodeAt(2),s[3]=n.charCodeAt(3),s.set(e,4),s}function k(){return It.slice()}function T(...r){let e=0;for(let s of r)e+=s.byteLength;let t=new Uint8Array(e),n=0;for(let s of r)t.set(s,n),n+=s.byteLength;return t}function Ye(r){let e=[],t=0;for(;t<r.byteLength;){if(t+4>r.byteLength)throw new Error("Truncated pkt-line header");let n=Xe.decode(r.subarray(t,t+4)),s=parseInt(n,16);if(Number.isNaN(s))throw new Error(`Invalid pkt-line length: ${n}`);if(s===0){e.push({type:"flush"}),t+=4;continue}if(s<4)throw new Error(`Invalid pkt-line length: ${s}`);if(t+s>r.byteLength)throw new Error(`Truncated pkt-line: need ${s} bytes at offset ${t}, have ${r.byteLength-t}`);e.push({type:"data",data:r.subarray(t+4,t+s)}),t+=s}return e}function Ve(r){if(r.type==="flush")return"";let e=Xe.decode(r.data);return e.endsWith(`
|
|
8
|
-
`)?e.slice(0,-1):e}var Ze=
|
|
8
|
+
`)?e.slice(0,-1):e}var Ze=65515;function Je(r,e,t,n){let s=[];s.push(R(`# service=${e}
|
|
9
9
|
`)),s.push(k());let a=[...t];n&&a.push(`symref=HEAD:${n}`),a.push("agent=just-git/1.0");let i=a.join(" ");if(r.length===0)s.push(R(`0000000000000000000000000000000000000000 capabilities^{}\0${i}
|
|
10
10
|
`));else for(let o=0;o<r.length;o++){let f=r[o];o===0?s.push(R(`${f.hash} ${f.name}\0${i}
|
|
11
11
|
`)):s.push(R(`${f.hash} ${f.name}
|
|
@@ -22,7 +22,7 @@ var M=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(t
|
|
|
22
22
|
`:`unpack error
|
|
23
23
|
`));for(let a of e)a.ok?n.push(R(`ok ${a.name}
|
|
24
24
|
`)):n.push(R(`ng ${a.name} ${a.error??"failed"}
|
|
25
|
-
`));n.push(k());let s=T(...n);if(t){let a=[];return a.push(ae(1,s)),a.push(k()),T(...a)}return s}function ae(r,e){let t=new Uint8Array(1+e.byteLength);return t[0]=r,t.set(e,1),R(t)}var C=class{entries=new Map;currentBytes=0;maxBytes;hits=0;misses=0;constructor(e=256*1024*1024){this.maxBytes=e}static key(e,t,n){if(n.length>0)return null;let s=t.slice().sort();return`${e}\0${s.join(",")}`}get(e){let t=this.entries.get(e);return t?this.hits++:this.misses++,t}set(e,t){if(this.entries.has(e))return;let n=t.packData.byteLength;if(!(n>this.maxBytes)){for(;this.currentBytes+n>this.maxBytes&&this.entries.size>0;){let s=this.entries.keys().next().value;this.currentBytes-=this.entries.get(s).packData.byteLength,this.entries.delete(s)}this.entries.set(e,t),this.currentBytes+=n}}get stats(){return{entries:this.entries.size,bytes:this.currentBytes,hits:this.hits,misses:this.misses}}},St=["multi_ack_detailed","no-done","side-band-64k","ofs-delta","include-tag"],Tt=["report-status","side-band-64k","ofs-delta","delete-refs"];async function ie(r){let e=await r.refStore.listRefs("refs"),t=await r.refStore.readRef("HEAD"),n=[],s=null,a;if(t)if(t.type==="symbolic"){a=t.target;let i=await r.refStore.readRef(t.target);i?.type==="direct"&&(s=i.hash)}else s=t.hash;s&&n.push({name:"HEAD",hash:s});for(let i of e)if(n.push({name:i.name,hash:i.hash}),i.name.startsWith("refs/tags/"))try{let o=await r.objectStore.read(i.hash);if(o.type==="tag"){let f=j(o.content);n.push({name:`${i.name}^{}`,hash:f.object})}}catch{}return{refs:n,headTarget:a}}function ce(r,e,t){return Je(r,e,e==="git-upload-pack"?St:Tt,t)}async function fe(r,e,t){let{wants:n,haves:s,capabilities:a}=Qe(e);if(n.length===0)return U(new Uint8Array(0),!1);let i=a.includes("multi_ack_detailed"),o=a.includes("side-band-64k"),f;if(i&&s.length>0){f=[];for(let d of s)await r.objectStore.exists(d)&&f.push(d);f.length===0&&(f=void 0)}let c=t?.cache&&t.cacheKey?C.key(t.cacheKey,n,s):null;if(c&&t?.cache){let d=t.cache.get(c);if(d)return U(d.packData,o,f)}return t?.noDelta?Ut(r,n,s,a,o,f):Ct(r,n,s,a,o,f,t,c)}async function Ut(r,e,t,n,s,a){let{count:i,objects:o}=await oe(r,e,t);if(i===0){let h=U(new Uint8Array(0),s,a);return new ReadableStream({start(b){b.enqueue(h),b.close()}})}let f=[];for await(let h of o)f.push(h);let c=new Set(f.map(h=>h.hash)),d=[];if(n.includes("include-tag")){let h=await r.refStore.listRefs("refs/tags");for(let b of h)if(!c.has(b.hash))try{let m=await r.objectStore.read(b.hash);if(m.type==="tag"){let P=j(m.content);c.has(P.object)&&d.push({hash:b.hash,type:"tag",content:m.content})}}catch{}}let y=f.length+d.length;async function*l(){for(let h of f){let b=await r.objectStore.read(h.hash);yield{type:b.type,content:b.content}}for(let h of d)yield{type:h.type,content:h.content}}let p=De(y,l()),u=et(p,s,a);return new ReadableStream({async pull(h){let{value:b,done:m}=await u.next();m?h.close():h.enqueue(b)}})}async function Ct(r,e,t,n,s,a,i,o){let f=await qe(r,e,t);if(f.count===0)return U(new Uint8Array(0),s,a);let c=await ze(f),d=new Set(c.map(h=>h.hash));if(n.includes("include-tag")){let h=await r.refStore.listRefs("refs/tags");for(let b of h)if(!d.has(b.hash))try{let m=await r.objectStore.read(b.hash);if(m.type==="tag"){let P=j(m.content);d.has(P.object)&&(c.push({hash:b.hash,type:"tag",content:m.content}),d.add(b.hash))}}catch{}}let y=i?.deltaWindow?{window:i.deltaWindow}:void 0,l=Fe(c,y),p=l.map(h=>({hash:h.hash,type:h.type,content:h.content,delta:h.delta,deltaBaseHash:h.deltaBase})),{data:u}=await He(p);if(o&&i?.cache){let h=l.filter(b=>b.delta).length;i.cache.set(o,{packData:u,objectCount:c.length,deltaCount:h})}return U(u,s,a)}async function de(r,e){let{commands:t,packData:n,capabilities:s}=tt(e),a=!0;if(n.byteLength>0)try{await r.objectStore.ingestPack(n)}catch{a=!1}let i=[];for(let o of t){let f=o.oldHash===Z,c=o.newHash===Z,d=!1;if(!f&&!c&&a)try{d=await _e(r,o.oldHash,o.newHash)}catch{}i.push({ref:o.refName,oldHash:f?null:o.oldHash,newHash:o.newHash,isFF:d,isCreate:f,isDelete:c})}return{updates:i,unpackOk:a,capabilities:s}}function Lt(r){let{resolveRepo:e,hooks:t,basePath:n}=r,s=r.packCache===!1?void 0:new C(r.packCache?.maxBytes);return{async fetch(a){try{let i=new URL(a.url),o=decodeURIComponent(i.pathname);if(n){let f=n.replace(/\/+$/,"");if(!o.startsWith(f))return new Response("Not Found",{status:404});o=o.slice(f.length)}if(o.startsWith("/")||(o=`/${o}`),o.endsWith("/info/refs")&&a.method==="GET"){let f=i.searchParams.get("service");if(f!=="git-upload-pack"&&f!=="git-receive-pack")return new Response("Unsupported service",{status:403});let c=le(o,"/info/refs"),d=await e(c,a);if(d instanceof Response)return d;if(!d)return new Response("Not Found",{status:404});let y=d,{refs:l,headTarget:p}=await ie(y),u=l;if(t?.advertiseRefs){let b=await t.advertiseRefs({repo:y,repoPath:c,refs:l,service:f,request:a});b&&(u=b)}let h=ce(u,f,p);return new Response(h,{headers:{"Content-Type":`application/x-${f}-advertisement`,"Cache-Control":"no-cache"}})}if(o.endsWith("/git-upload-pack")&&a.method==="POST"){let f=le(o,"/git-upload-pack"),c=await e(f,a);if(c instanceof Response)return c;if(!c)return new Response("Not Found",{status:404});let d=c,y=await rt(a),l=await fe(d,y,{cache:s,cacheKey:f,noDelta:r.packOptions?.noDelta,deltaWindow:r.packOptions?.deltaWindow});return new Response(l,{headers:{"Content-Type":"application/x-git-upload-pack-result"}})}if(o.endsWith("/git-receive-pack")&&a.method==="POST"){let f=le(o,"/git-receive-pack"),c=await e(f,a);if(c instanceof Response)return c;if(!c)return new Response("Not Found",{status:404});let d=c,y=await rt(a),{updates:l,unpackOk:p,capabilities:u}=await de(d,y),h=u.includes("side-band-64k"),b=u.includes("report-status");if(!p){if(b){let x=l.map(g=>({name:g.ref,ok:!1,error:"unpack failed"}));return new Response(V(!1,x,h),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response(new Uint8Array(0),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}if(t?.preReceive){let x=await t.preReceive({repo:d,repoPath:f,updates:l,request:a});if(H(x)){if(b){let g=x.message??"pre-receive hook declined",O=l.map(L=>({name:L.ref,ok:!1,error:g}));return new Response(V(!0,O,h),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response(new Uint8Array(0),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}}let m=[],P=[];for(let x of l){if(t?.update){let g=await t.update({repo:d,repoPath:f,update:x,request:a});if(H(g)){m.push({ref:x.ref,ok:!1,error:g.message??"update hook declined"});continue}}try{let g=x.isCreate?null:x.oldHash,O=x.isDelete?null:{type:"direct",hash:x.newHash};if(!await d.refStore.compareAndSwapRef(x.ref,g,O)){m.push({ref:x.ref,ok:!1,error:"failed to lock"});continue}m.push({ref:x.ref,ok:!0}),P.push(x)}catch(g){m.push({ref:x.ref,ok:!1,error:g instanceof Error?g.message:String(g)})}}if(t?.postReceive&&P.length>0)try{await t.postReceive({repo:d,repoPath:f,updates:P,request:a})}catch{}if(b){let x=m.map(g=>({name:g.ref,ok:g.ok,error:g.error}));return new Response(V(!0,x,h),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response(new Uint8Array(0),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response("Not Found",{status:404})}catch(i){return console.error(" [server] Internal error:",i),new Response("Internal Server Error",{status:500})}}}}function le(r,e){let t=r.slice(0,-e.length);return t.startsWith("/")&&(t=t.slice(1)),t}async function rt(r){let e=new Uint8Array(await r.arrayBuffer()),t=r.headers.get("content-encoding");if(t==="gzip"||t==="x-gzip"){let n=new DecompressionStream("gzip"),s=n.writable.getWriter();return s.write(e),s.close(),new Uint8Array(await new Response(n.readable).arrayBuffer())}return e}function Ht(r){return(e,t)=>{let n=[];e.on("data",s=>n.push(new Uint8Array(s))),e.on("error",()=>{t.writeHead(500),t.end("Internal Server Error")}),e.on("end",()=>{Dt(r,e,n,t).catch(()=>{try{t.writeHead(500),t.end("Internal Server Error")}catch{}})})}}async function Dt(r,e,t,n){let s=typeof e.headers.host=="string"?e.headers.host:"localhost",a=new URL(e.url??"/",`http://${s}`),i=new Headers;for(let[p,u]of Object.entries(e.headers))if(u!==void 0)if(Array.isArray(u))for(let h of u)i.append(p,h);else i.set(p,u);let o=e.method??"GET",f;if(o!=="GET"&&o!=="HEAD"){let p=0;for(let b of t)p+=b.byteLength;let u=new Uint8Array(p),h=0;for(let b of t)u.set(b,h),h+=b.byteLength;f=u}let c=new Request(a.href,{method:o,headers:i,body:f}),d=await r.fetch(c),y={};d.headers.forEach((p,u)=>{y[u]=p}),n.writeHead(d.status,y);let l=new Uint8Array(await d.arrayBuffer());l.byteLength>0&&n.write(l),n.end()}function Nt(...r){let e=r.filter(o=>o!=null);if(e.length===0)return{};if(e.length===1)return e[0];let t={},n=e.filter(o=>o.preReceive).map(o=>o.preReceive);n.length>0&&(t.preReceive=async o=>{for(let f of n){let c=await f(o);if(H(c))return c}});let s=e.filter(o=>o.update).map(o=>o.update);s.length>0&&(t.update=async o=>{for(let f of s){let c=await f(o);if(H(c))return c}});let a=e.filter(o=>o.postReceive).map(o=>o.postReceive);a.length>0&&(t.postReceive=async o=>{for(let f of a)try{await f(o)}catch{}});let i=e.filter(o=>o.advertiseRefs).map(o=>o.advertiseRefs);return i.length>0&&(t.advertiseRefs=async o=>{let f=o.refs;for(let c of i){let d=await c({...o,refs:f});d&&(f=d)}return f}),t}function Bt(r){let{protectedBranches:e=[],denyNonFastForward:t=!1,denyDeletes:n=!1,denyDeleteTags:s=!1,authorize:a,onPush:i}=r,o=new Set(e.map(c=>c.startsWith("refs/")?c:`refs/heads/${c}`)),f={};return(a||o.size>0)&&(f.preReceive=async c=>{if(a&&!await a(c.request))return{reject:!0,message:"unauthorized"};for(let d of c.updates)if(o.has(d.ref)){if(d.isDelete)return{reject:!0,message:`cannot delete protected branch ${d.ref}`};if(!d.isCreate&&!d.isFF)return{reject:!0,message:`non-fast-forward push to protected branch ${d.ref}`}}}),(t||n||s)&&(f.update=async c=>{if(n&&c.update.isDelete)return{reject:!0,message:"ref deletion denied"};if(s&&c.update.ref.startsWith("refs/tags/")){if(c.update.isDelete)return{reject:!0,message:"tag deletion denied"};if(!c.update.isCreate)return{reject:!0,message:"tag overwrite denied"}}if(t&&!c.update.isCreate&&!c.update.isDelete&&!c.update.isFF)return{reject:!0,message:"non-fast-forward"}}),i&&(f.postReceive=i),f}var pe=class{objects=new Map;refs=new Map;repo(e){return{objectStore:new ue(this.getObjects(e)),refStore:new he(this.getRefs(e))}}async deleteRepo(e){this.objects.get(e)?.clear(),this.objects.delete(e),this.refs.get(e)?.clear(),this.refs.delete(e)}getObjects(e){let t=this.objects.get(e);return t||(t=new Map,this.objects.set(e,t)),t}getRefs(e){let t=this.refs.get(e);return t||(t=new Map,this.refs.set(e,t)),t}},ue=class{constructor(e){this.store=e}async write(e,t){let n=await v(S(e,t));return this.store.has(n)||this.store.set(n,{type:e,content:new Uint8Array(t)}),n}async read(e){let t=this.store.get(e);if(!t)throw new Error(`object ${e} not found`);return{type:t.type,content:new Uint8Array(t.content)}}async exists(e){return this.store.has(e)}async ingestPack(e){if(e.byteLength<32||new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(8)===0)return 0;let s=this.store,a=await I(e,async i=>{let o=s.get(i);return o?{type:o.type,content:new Uint8Array(o.content)}:null});for(let i of a)s.has(i.hash)||s.set(i.hash,{type:i.type,content:i.content});return a.length}async findByPrefix(e){if(e.length<4)return[];let t=[];for(let n of this.store.keys())n.startsWith(e)&&t.push(n);return t}},he=class{constructor(e){this.store=e}async readRef(e){return this.store.get(e)??null}async writeRef(e,t){this.store.set(e,t)}async deleteRef(e){this.store.delete(e)}async compareAndSwapRef(e,t,n){let s=this.store.get(e)??null,a=null;if(s&&(s.type==="direct"?a=s.hash:s.type==="symbolic"&&(a=this.resolveChain(s.target))),t===null){if(s!==null)return!1}else if(a!==t)return!1;return n===null?this.store.delete(e):this.store.set(e,n),!0}async listRefs(e){let t=[];for(let[n,s]of this.store)if(!(e&&!n.startsWith(e))){if(s.type==="direct")t.push({name:n,hash:s.hash});else if(s.type==="symbolic"){let a=this.resolveChain(s.target);a&&t.push({name:n,hash:a})}}return t}resolveChain(e,t=0){if(t>10)return null;let n=this.store.get(e);return n?n.type==="direct"?n.hash:n.type==="symbolic"?this.resolveChain(n.target,t+1):null:null}};function $t(r){return{run:e=>r.exec(e),prepare:e=>{let t=r.prepare(e);return{run:(...n)=>t.run(...n),get:(...n)=>t.get(...n)??null,all:(...n)=>t.all(...n)}},transaction:e=>r.transaction(e)}}var _t=`
|
|
25
|
+
`));n.push(k());let s=T(...n);if(t){let a=[];return a.push(ae(1,s)),a.push(k()),T(...a)}return s}function ae(r,e){let t=new Uint8Array(1+e.byteLength);return t[0]=r,t.set(e,1),R(t)}var C=class{entries=new Map;currentBytes=0;maxBytes;hits=0;misses=0;constructor(e=256*1024*1024){this.maxBytes=e}static key(e,t,n){if(n.length>0)return null;let s=t.slice().sort();return`${e}\0${s.join(",")}`}get(e){let t=this.entries.get(e);return t?this.hits++:this.misses++,t}set(e,t){if(this.entries.has(e))return;let n=t.packData.byteLength;if(!(n>this.maxBytes)){for(;this.currentBytes+n>this.maxBytes&&this.entries.size>0;){let s=this.entries.keys().next().value;this.currentBytes-=this.entries.get(s).packData.byteLength,this.entries.delete(s)}this.entries.set(e,t),this.currentBytes+=n}}get stats(){return{entries:this.entries.size,bytes:this.currentBytes,hits:this.hits,misses:this.misses}}},St=["multi_ack_detailed","no-done","side-band-64k","ofs-delta","include-tag","allow-reachable-sha1-in-want"],Tt=["report-status","side-band-64k","ofs-delta","delete-refs"];async function ie(r){let e=await r.refStore.listRefs("refs"),t=await r.refStore.readRef("HEAD"),n=[],s=null,a;if(t)if(t.type==="symbolic"){a=t.target;let o=await r.refStore.readRef(t.target);o?.type==="direct"&&(s=o.hash)}else s=t.hash;let i=e.slice().sort((o,f)=>o.name<f.name?-1:o.name>f.name?1:0);s&&n.push({name:"HEAD",hash:s});for(let o of i)if(n.push({name:o.name,hash:o.hash}),o.name.startsWith("refs/tags/"))try{let f=await r.objectStore.read(o.hash);if(f.type==="tag"){let c=j(f.content);n.push({name:`${o.name}^{}`,hash:c.object})}}catch{}return{refs:n,headTarget:a}}function ce(r,e,t){return Je(r,e,e==="git-upload-pack"?St:Tt,t)}async function fe(r,e,t){let{wants:n,haves:s,capabilities:a}=Qe(e);if(n.length===0)return U(new Uint8Array(0),!1);let i=a.includes("multi_ack_detailed"),o=a.includes("side-band-64k"),f;if(i&&s.length>0){f=[];for(let d of s)await r.objectStore.exists(d)&&f.push(d);f.length===0&&(f=void 0)}let c=t?.cache&&t.cacheKey?C.key(t.cacheKey,n,s):null;if(c&&t?.cache){let d=t.cache.get(c);if(d)return U(d.packData,o,f)}return t?.noDelta?Ut(r,n,s,a,o,f):Ct(r,n,s,a,o,f,t,c)}async function Ut(r,e,t,n,s,a){let{count:i,objects:o}=await oe(r,e,t);if(i===0){let h=U(new Uint8Array(0),s,a);return new ReadableStream({start(b){b.enqueue(h),b.close()}})}let f=[];for await(let h of o)f.push(h);let c=new Set(f.map(h=>h.hash)),d=[];if(n.includes("include-tag")){let h=await r.refStore.listRefs("refs/tags");for(let b of h)if(!c.has(b.hash))try{let m=await r.objectStore.read(b.hash);if(m.type==="tag"){let P=j(m.content);c.has(P.object)&&d.push({hash:b.hash,type:"tag",content:m.content})}}catch{}}let y=f.length+d.length;async function*l(){for(let h of f){let b=await r.objectStore.read(h.hash);yield{type:b.type,content:b.content}}for(let h of d)yield{type:h.type,content:h.content}}let p=De(y,l()),u=et(p,s,a);return new ReadableStream({async pull(h){let{value:b,done:m}=await u.next();m?h.close():h.enqueue(b)}})}async function Ct(r,e,t,n,s,a,i,o){let f=await qe(r,e,t);if(f.count===0)return U(new Uint8Array(0),s,a);let c=await ze(f),d=new Set(c.map(h=>h.hash));if(n.includes("include-tag")){let h=await r.refStore.listRefs("refs/tags");for(let b of h)if(!d.has(b.hash))try{let m=await r.objectStore.read(b.hash);if(m.type==="tag"){let P=j(m.content);d.has(P.object)&&(c.push({hash:b.hash,type:"tag",content:m.content}),d.add(b.hash))}}catch{}}let y=i?.deltaWindow?{window:i.deltaWindow}:void 0,l=Fe(c,y),p=l.map(h=>({hash:h.hash,type:h.type,content:h.content,delta:h.delta,deltaBaseHash:h.deltaBase})),{data:u}=await He(p);if(o&&i?.cache){let h=l.filter(b=>b.delta).length;i.cache.set(o,{packData:u,objectCount:c.length,deltaCount:h})}return U(u,s,a)}async function de(r,e){let{commands:t,packData:n,capabilities:s}=tt(e),a=!0;if(n.byteLength>0)try{await r.objectStore.ingestPack(n)}catch{a=!1}let i=[];for(let o of t){let f=o.oldHash===Z,c=o.newHash===Z,d=!1;if(!f&&!c&&a)try{d=await _e(r,o.oldHash,o.newHash)}catch{}i.push({ref:o.refName,oldHash:f?null:o.oldHash,newHash:o.newHash,isFF:d,isCreate:f,isDelete:c})}return{updates:i,unpackOk:a,capabilities:s}}function Lt(r){let{resolveRepo:e,hooks:t,basePath:n}=r,s=r.packCache===!1?void 0:new C(r.packCache?.maxBytes);return{async fetch(a){try{let i=new URL(a.url),o=decodeURIComponent(i.pathname);if(n){let f=n.replace(/\/+$/,"");if(!o.startsWith(f))return new Response("Not Found",{status:404});o=o.slice(f.length)}if(o.startsWith("/")||(o=`/${o}`),o.endsWith("/info/refs")&&a.method==="GET"){let f=i.searchParams.get("service");if(f!=="git-upload-pack"&&f!=="git-receive-pack")return new Response("Unsupported service",{status:403});let c=le(o,"/info/refs"),d=await e(c,a);if(d instanceof Response)return d;if(!d)return new Response("Not Found",{status:404});let y=d,{refs:l,headTarget:p}=await ie(y),u=l;if(t?.advertiseRefs){let b=await t.advertiseRefs({repo:y,repoPath:c,refs:l,service:f,request:a});b&&(u=b)}let h=ce(u,f,p);return new Response(h,{headers:{"Content-Type":`application/x-${f}-advertisement`,"Cache-Control":"no-cache"}})}if(o.endsWith("/git-upload-pack")&&a.method==="POST"){let f=le(o,"/git-upload-pack"),c=await e(f,a);if(c instanceof Response)return c;if(!c)return new Response("Not Found",{status:404});let d=c,y=await rt(a),l=await fe(d,y,{cache:s,cacheKey:f,noDelta:r.packOptions?.noDelta,deltaWindow:r.packOptions?.deltaWindow});return new Response(l,{headers:{"Content-Type":"application/x-git-upload-pack-result"}})}if(o.endsWith("/git-receive-pack")&&a.method==="POST"){let f=le(o,"/git-receive-pack"),c=await e(f,a);if(c instanceof Response)return c;if(!c)return new Response("Not Found",{status:404});let d=c,y=await rt(a),{updates:l,unpackOk:p,capabilities:u}=await de(d,y),h=u.includes("side-band-64k"),b=u.includes("report-status");if(!p){if(b){let x=l.map(g=>({name:g.ref,ok:!1,error:"unpack failed"}));return new Response(V(!1,x,h),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response(new Uint8Array(0),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}if(t?.preReceive){let x=await t.preReceive({repo:d,repoPath:f,updates:l,request:a});if(H(x)){if(b){let g=x.message??"pre-receive hook declined",O=l.map(L=>({name:L.ref,ok:!1,error:g}));return new Response(V(!0,O,h),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response(new Uint8Array(0),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}}let m=[],P=[];for(let x of l){if(t?.update){let g=await t.update({repo:d,repoPath:f,update:x,request:a});if(H(g)){m.push({ref:x.ref,ok:!1,error:g.message??"update hook declined"});continue}}try{let g=x.isCreate?null:x.oldHash,O=x.isDelete?null:{type:"direct",hash:x.newHash};if(!await d.refStore.compareAndSwapRef(x.ref,g,O)){m.push({ref:x.ref,ok:!1,error:"failed to lock"});continue}m.push({ref:x.ref,ok:!0}),P.push(x)}catch(g){m.push({ref:x.ref,ok:!1,error:g instanceof Error?g.message:String(g)})}}if(t?.postReceive&&P.length>0)try{await t.postReceive({repo:d,repoPath:f,updates:P,request:a})}catch{}if(b){let x=m.map(g=>({name:g.ref,ok:g.ok,error:g.error}));return new Response(V(!0,x,h),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response(new Uint8Array(0),{headers:{"Content-Type":"application/x-git-receive-pack-result"}})}return new Response("Not Found",{status:404})}catch(i){return console.error(" [server] Internal error:",i),new Response("Internal Server Error",{status:500})}}}}function le(r,e){let t=r.slice(0,-e.length);return t.startsWith("/")&&(t=t.slice(1)),t}async function rt(r){let e=new Uint8Array(await r.arrayBuffer()),t=r.headers.get("content-encoding");if(t==="gzip"||t==="x-gzip"){let n=new DecompressionStream("gzip"),s=n.writable.getWriter();return s.write(e),s.close(),new Uint8Array(await new Response(n.readable).arrayBuffer())}return e}function Ht(r){return(e,t)=>{let n=[];e.on("data",s=>n.push(new Uint8Array(s))),e.on("error",()=>{t.writeHead(500),t.end("Internal Server Error")}),e.on("end",()=>{Dt(r,e,n,t).catch(()=>{try{t.writeHead(500),t.end("Internal Server Error")}catch{}})})}}async function Dt(r,e,t,n){let s=typeof e.headers.host=="string"?e.headers.host:"localhost",a=new URL(e.url??"/",`http://${s}`),i=new Headers;for(let[p,u]of Object.entries(e.headers))if(u!==void 0)if(Array.isArray(u))for(let h of u)i.append(p,h);else i.set(p,u);let o=e.method??"GET",f;if(o!=="GET"&&o!=="HEAD"){let p=0;for(let b of t)p+=b.byteLength;let u=new Uint8Array(p),h=0;for(let b of t)u.set(b,h),h+=b.byteLength;f=u}let c=new Request(a.href,{method:o,headers:i,body:f}),d=await r.fetch(c),y={};d.headers.forEach((p,u)=>{y[u]=p}),n.writeHead(d.status,y);let l=new Uint8Array(await d.arrayBuffer());l.byteLength>0&&n.write(l),n.end()}function Nt(...r){let e=r.filter(o=>o!=null);if(e.length===0)return{};if(e.length===1)return e[0];let t={},n=e.filter(o=>o.preReceive).map(o=>o.preReceive);n.length>0&&(t.preReceive=async o=>{for(let f of n){let c=await f(o);if(H(c))return c}});let s=e.filter(o=>o.update).map(o=>o.update);s.length>0&&(t.update=async o=>{for(let f of s){let c=await f(o);if(H(c))return c}});let a=e.filter(o=>o.postReceive).map(o=>o.postReceive);a.length>0&&(t.postReceive=async o=>{for(let f of a)try{await f(o)}catch{}});let i=e.filter(o=>o.advertiseRefs).map(o=>o.advertiseRefs);return i.length>0&&(t.advertiseRefs=async o=>{let f=o.refs;for(let c of i){let d=await c({...o,refs:f});d&&(f=d)}return f}),t}function Bt(r){let{protectedBranches:e=[],denyNonFastForward:t=!1,denyDeletes:n=!1,denyDeleteTags:s=!1,authorizePush:a,onPush:i}=r,o=new Set(e.map(c=>c.startsWith("refs/")?c:`refs/heads/${c}`)),f={};return(a||o.size>0)&&(f.preReceive=async c=>{if(a&&!await a(c.request))return{reject:!0,message:"unauthorized"};for(let d of c.updates)if(o.has(d.ref)){if(d.isDelete)return{reject:!0,message:`cannot delete protected branch ${d.ref}`};if(!d.isCreate&&!d.isFF)return{reject:!0,message:`non-fast-forward push to protected branch ${d.ref}`}}}),(t||n||s)&&(f.update=async c=>{if(n&&c.update.isDelete)return{reject:!0,message:"ref deletion denied"};if(s&&c.update.ref.startsWith("refs/tags/")){if(c.update.isDelete)return{reject:!0,message:"tag deletion denied"};if(!c.update.isCreate)return{reject:!0,message:"tag overwrite denied"}}if(t&&!c.update.isCreate&&!c.update.isDelete&&!c.update.isFF)return{reject:!0,message:"non-fast-forward"}}),i&&(f.postReceive=i),f}var pe=class{objects=new Map;refs=new Map;repo(e){return{objectStore:new ue(this.getObjects(e)),refStore:new he(this.getRefs(e))}}async deleteRepo(e){this.objects.get(e)?.clear(),this.objects.delete(e),this.refs.get(e)?.clear(),this.refs.delete(e)}getObjects(e){let t=this.objects.get(e);return t||(t=new Map,this.objects.set(e,t)),t}getRefs(e){let t=this.refs.get(e);return t||(t=new Map,this.refs.set(e,t)),t}},ue=class{constructor(e){this.store=e}async write(e,t){let n=await v(S(e,t));return this.store.has(n)||this.store.set(n,{type:e,content:new Uint8Array(t)}),n}async read(e){let t=this.store.get(e);if(!t)throw new Error(`object ${e} not found`);return{type:t.type,content:new Uint8Array(t.content)}}async exists(e){return this.store.has(e)}async ingestPack(e){if(e.byteLength<32||new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(8)===0)return 0;let s=this.store,a=await I(e,async i=>{let o=s.get(i);return o?{type:o.type,content:new Uint8Array(o.content)}:null});for(let i of a)s.has(i.hash)||s.set(i.hash,{type:i.type,content:i.content});return a.length}async findByPrefix(e){if(e.length<4)return[];let t=[];for(let n of this.store.keys())n.startsWith(e)&&t.push(n);return t}},he=class{constructor(e){this.store=e}async readRef(e){return this.store.get(e)??null}async writeRef(e,t){this.store.set(e,t)}async deleteRef(e){this.store.delete(e)}async compareAndSwapRef(e,t,n){let s=this.store.get(e)??null,a=null;if(s&&(s.type==="direct"?a=s.hash:s.type==="symbolic"&&(a=this.resolveChain(s.target))),t===null){if(s!==null)return!1}else if(a!==t)return!1;return n===null?this.store.delete(e):this.store.set(e,n),!0}async listRefs(e){let t=[];for(let[n,s]of this.store)if(!(e&&!n.startsWith(e))){if(s.type==="direct")t.push({name:n,hash:s.hash});else if(s.type==="symbolic"){let a=this.resolveChain(s.target);a&&t.push({name:n,hash:a})}}return t}resolveChain(e,t=0){if(t>10)return null;let n=this.store.get(e);return n?n.type==="direct"?n.hash:n.type==="symbolic"?this.resolveChain(n.target,t+1):null:null}};function $t(r){return{run:e=>r.exec(e),prepare:e=>{let t=r.prepare(e);return{run:(...n)=>t.run(...n),get:(...n)=>t.get(...n)??null,all:(...n)=>t.all(...n)}},transaction:e=>r.transaction(e)}}var _t=`
|
|
26
26
|
CREATE TABLE IF NOT EXISTS git_objects (
|
|
27
27
|
repo_id TEXT NOT NULL,
|
|
28
28
|
hash TEXT NOT NULL,
|