@scolladon/tsgit 0.9.0 → 1.1.0
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/README.md +116 -1
- package/dist/cjs/adapters/browser/index.cjs +1 -1
- package/dist/cjs/adapters/browser/index.cjs.map +1 -1
- package/dist/cjs/adapters/memory/index.cjs +1 -1
- package/dist/cjs/adapters/memory/index.cjs.map +1 -1
- package/dist/cjs/adapters/node/index.cjs +1 -1
- package/dist/cjs/adapters/node/index.cjs.map +1 -1
- package/dist/cjs/chunks/{browser-http-transport-BBF8uw-f.cjs → browser-http-transport-DcG05jw3.cjs} +2 -2
- package/dist/cjs/chunks/{browser-http-transport-BBF8uw-f.cjs.map → browser-http-transport-DcG05jw3.cjs.map} +1 -1
- package/dist/cjs/chunks/context-BcoAzPuU.cjs.map +1 -1
- package/dist/cjs/chunks/error-CqLvhejR.cjs +2 -0
- package/dist/cjs/chunks/error-CqLvhejR.cjs.map +1 -0
- package/dist/cjs/chunks/index-BcxdLkNe.cjs +2 -0
- package/dist/cjs/chunks/index-BcxdLkNe.cjs.map +1 -0
- package/dist/cjs/chunks/index-D5Nd-Mks.cjs +2 -0
- package/dist/cjs/chunks/index-D5Nd-Mks.cjs.map +1 -0
- package/dist/cjs/chunks/{logger-Cz9r6yt5.cjs → logger-C8Z5BfFF.cjs} +2 -2
- package/dist/cjs/chunks/{logger-Cz9r6yt5.cjs.map → logger-C8Z5BfFF.cjs.map} +1 -1
- package/dist/cjs/chunks/memory-http-transport-Pjyme5KN.cjs +2 -0
- package/dist/cjs/chunks/memory-http-transport-Pjyme5KN.cjs.map +1 -0
- package/dist/cjs/chunks/node-http-transport-UkW5eEm3.cjs +2 -0
- package/dist/cjs/chunks/node-http-transport-UkW5eEm3.cjs.map +1 -0
- package/dist/cjs/chunks/{progress-CK7CT9vU.cjs → progress-CntEbiuo.cjs} +2 -2
- package/dist/cjs/chunks/{progress-CK7CT9vU.cjs.map → progress-CntEbiuo.cjs.map} +1 -1
- package/dist/cjs/chunks/readable-stream-MTA6D0Zh.cjs +2 -0
- package/dist/cjs/chunks/readable-stream-MTA6D0Zh.cjs.map +1 -0
- package/dist/cjs/chunks/repository-B_jx2AKW.cjs +2 -0
- package/dist/cjs/chunks/repository-B_jx2AKW.cjs.map +1 -0
- package/dist/cjs/commands/index.cjs +1 -1
- package/dist/cjs/index.browser.cjs +1 -1
- package/dist/cjs/index.browser.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.default.cjs +1 -1
- package/dist/cjs/index.default.cjs.map +1 -1
- package/dist/cjs/index.node.cjs +1 -1
- package/dist/cjs/index.node.cjs.map +1 -1
- package/dist/cjs/operators/index.cjs +1 -1
- package/dist/cjs/operators/index.cjs.map +1 -1
- package/dist/cjs/primitives/index.cjs +1 -1
- package/dist/cjs/primitives/index.cjs.map +1 -1
- package/dist/cjs/transport/index.cjs.map +1 -1
- package/dist/esm/adapters/browser/index.js +1 -1
- package/dist/esm/adapters/browser/index.js.map +1 -1
- package/dist/esm/adapters/memory/index.js +1 -1
- package/dist/esm/adapters/memory/index.js.map +1 -1
- package/dist/esm/adapters/node/index.js +1 -1
- package/dist/esm/adapters/node/index.js.map +1 -1
- package/dist/esm/chunks/{browser-http-transport-CRPPmib5.js → browser-http-transport-COFgnEyq.js} +2 -2
- package/dist/esm/chunks/{browser-http-transport-CRPPmib5.js.map → browser-http-transport-COFgnEyq.js.map} +1 -1
- package/dist/esm/chunks/context-CumKOV7K.js.map +1 -1
- package/dist/esm/chunks/error-BN9rdQ33.js +2 -0
- package/dist/esm/chunks/error-BN9rdQ33.js.map +1 -0
- package/dist/esm/chunks/index-BdV37p4e.js +2 -0
- package/dist/esm/chunks/index-BdV37p4e.js.map +1 -0
- package/dist/esm/chunks/index-BkRJ9-Im.js +2 -0
- package/dist/esm/chunks/index-BkRJ9-Im.js.map +1 -0
- package/dist/esm/chunks/{logger-Cg7fUh8D.js → logger-BLZbLzva.js} +2 -2
- package/dist/esm/chunks/{logger-Cg7fUh8D.js.map → logger-BLZbLzva.js.map} +1 -1
- package/dist/esm/chunks/memory-http-transport-DRYdYgiE.js +2 -0
- package/dist/esm/chunks/memory-http-transport-DRYdYgiE.js.map +1 -0
- package/dist/esm/chunks/node-http-transport-Bp5cFZCt.js +2 -0
- package/dist/esm/chunks/node-http-transport-Bp5cFZCt.js.map +1 -0
- package/dist/esm/chunks/progress-DJU_f66N.js +2 -0
- package/dist/esm/chunks/{progress-OxUHmDV4.js.map → progress-DJU_f66N.js.map} +1 -1
- package/dist/esm/chunks/readable-stream-CGuf8k1J.js +2 -0
- package/dist/esm/chunks/readable-stream-CGuf8k1J.js.map +1 -0
- package/dist/esm/chunks/repository-DiagDiT_.js +2 -0
- package/dist/esm/chunks/repository-DiagDiT_.js.map +1 -0
- package/dist/esm/commands/index.js +1 -1
- package/dist/esm/index.browser.js +1 -1
- package/dist/esm/index.browser.js.map +1 -1
- package/dist/esm/index.default.js +1 -1
- package/dist/esm/index.default.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.node.js +1 -1
- package/dist/esm/index.node.js.map +1 -1
- package/dist/esm/operators/index.js +1 -1
- package/dist/esm/operators/index.js.map +1 -1
- package/dist/esm/primitives/index.js +1 -1
- package/dist/esm/primitives/index.js.map +1 -1
- package/dist/esm/transport/index.js.map +1 -1
- package/dist/types/adapters/browser/index.d.cts +2 -2
- package/dist/types/adapters/browser/index.d.ts +2 -2
- package/dist/types/adapters/memory/index.d.cts +4 -2
- package/dist/types/adapters/memory/index.d.ts +4 -2
- package/dist/types/adapters/node/index.d.cts +117 -3
- package/dist/types/adapters/node/index.d.ts +117 -3
- package/dist/types/chunks/{context-Ku1aP8Ie.d.cts → context-D84z1i5F.d.cts} +39 -21
- package/dist/types/chunks/{context-C6df52Qs.d.ts → context-o5TPfMB2.d.ts} +39 -21
- package/dist/types/chunks/{diff-change-BwO75AgS.d.cts → diff-change-Bm1zvVsC.d.cts} +1 -1
- package/dist/types/chunks/{diff-change-CUWN3OSK.d.ts → diff-change-alGRzD_j.d.ts} +1 -1
- package/dist/types/chunks/{http-transport--_NdQOiw.d.cts → http-transport-DirKfK2S.d.cts} +1 -1
- package/dist/types/chunks/{http-transport--_NdQOiw.d.ts → http-transport-DirKfK2S.d.ts} +1 -1
- package/dist/types/chunks/{repository-Cv4Y0T9t.d.cts → repository-23evW2h-.d.cts} +5 -4
- package/dist/types/chunks/{repository-BBKJnr8a.d.ts → repository-BT7Xq1kJ.d.ts} +5 -4
- package/dist/types/chunks/write-tree-DNjhjS3t.d.ts +282 -0
- package/dist/types/chunks/write-tree-DVp0RJ_r.d.cts +282 -0
- package/dist/types/commands/index.d.cts +82 -36
- package/dist/types/commands/index.d.ts +82 -36
- package/dist/types/index.browser.d.cts +5 -5
- package/dist/types/index.browser.d.ts +5 -5
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.default.d.cts +5 -5
- package/dist/types/index.default.d.ts +5 -5
- package/dist/types/index.node.d.cts +5 -5
- package/dist/types/index.node.d.ts +5 -5
- package/dist/types/operators/index.d.cts +17 -1
- package/dist/types/operators/index.d.ts +17 -1
- package/dist/types/primitives/index.d.cts +223 -186
- package/dist/types/primitives/index.d.ts +223 -186
- package/dist/types/transport/index.d.cts +1 -1
- package/dist/types/transport/index.d.ts +1 -1
- package/package.json +70 -23
- package/dist/cjs/chunks/error-DL4SHCBJ.cjs +0 -2
- package/dist/cjs/chunks/error-DL4SHCBJ.cjs.map +0 -1
- package/dist/cjs/chunks/error-DN8Vnwr4.cjs +0 -2
- package/dist/cjs/chunks/error-DN8Vnwr4.cjs.map +0 -1
- package/dist/cjs/chunks/index-iUd-bwwm.cjs +0 -2
- package/dist/cjs/chunks/index-iUd-bwwm.cjs.map +0 -1
- package/dist/cjs/chunks/memory-http-transport-DGll7Af4.cjs +0 -2
- package/dist/cjs/chunks/memory-http-transport-DGll7Af4.cjs.map +0 -1
- package/dist/cjs/chunks/merge-base-DlGWnkxP.cjs +0 -2
- package/dist/cjs/chunks/merge-base-DlGWnkxP.cjs.map +0 -1
- package/dist/cjs/chunks/node-http-transport-CuOgJlws.cjs +0 -2
- package/dist/cjs/chunks/node-http-transport-CuOgJlws.cjs.map +0 -1
- package/dist/cjs/chunks/repository-Cbzk-Qwz.cjs +0 -2
- package/dist/cjs/chunks/repository-Cbzk-Qwz.cjs.map +0 -1
- package/dist/esm/chunks/error-CAlAXhN3.js +0 -2
- package/dist/esm/chunks/error-CAlAXhN3.js.map +0 -1
- package/dist/esm/chunks/error-DVZkS_ub.js +0 -2
- package/dist/esm/chunks/error-DVZkS_ub.js.map +0 -1
- package/dist/esm/chunks/index-gUdap5AF.js +0 -2
- package/dist/esm/chunks/index-gUdap5AF.js.map +0 -1
- package/dist/esm/chunks/memory-http-transport-Cv1sbkCX.js +0 -2
- package/dist/esm/chunks/memory-http-transport-Cv1sbkCX.js.map +0 -1
- package/dist/esm/chunks/merge-base-opORz-S1.js +0 -2
- package/dist/esm/chunks/merge-base-opORz-S1.js.map +0 -1
- package/dist/esm/chunks/node-http-transport-CuXVJf0s.js +0 -2
- package/dist/esm/chunks/node-http-transport-CuXVJf0s.js.map +0 -1
- package/dist/esm/chunks/progress-OxUHmDV4.js +0 -2
- package/dist/esm/chunks/repository-BaEhU6zt.js +0 -2
- package/dist/esm/chunks/repository-BaEhU6zt.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.js","sources":["../../src/index.node.ts"],"sourcesContent":[null],"names":["openRepository","async","opts","cwd","process","resolvedCwd","realpath","nodePath","resolve","catch","layout","discoverLayout","workDir","gitDir","join","bare","fallback","fs","NodeFileSystem","hash","NodeHashService","compressor","NodeCompressor","transport","NodeHttpTransport","allowInsecureHttp","runtime","hashConfig","SHA1_CONFIG","deltaCache","createLruCache","deltaCacheMaxBytes","deltaCacheMaxEntries","_cwd","_a","_b","_c","coreOpts","openRepositoryCore","start","current","candidate","result","stat","isDirectory","parent","dirname"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.node.js","sources":["../../src/index.node.ts"],"sourcesContent":[null],"names":["openRepository","async","opts","cwd","process","resolvedCwd","realpath","nodePath","resolve","catch","layout","discoverLayout","workDir","gitDir","join","bare","fallback","fs","NodeFileSystem","hash","NodeHashService","compressor","NodeCompressor","transport","NodeHttpTransport","allowInsecureHttp","runtime","hashConfig","SHA1_CONFIG","deltaCache","createLruCache","deltaCacheMaxBytes","deltaCacheMaxEntries","_cwd","_a","_b","_c","coreOpts","openRepositoryCore","start","current","candidate","result","stat","isDirectory","parent","dirname"],"mappings":"6tBAqBA,MAeaA,EAAiBC,MAAOC,EAAkC,MACrE,MAAMC,EAAMD,EAAKC,KAAOC,QAAQD,MAQ1BE,QAAoBC,EAASC,EAASC,QAAQL,IAAMM,MAAM,IAAMF,EAASC,QAAQL,IAKjFO,QAAgBC,EAAeN,IAAiB,CACpDO,QAASP,EACTQ,OAAQN,EAASO,KAAKT,EAAa,QACnCU,MAAM,GAQFC,EAAW,CACfC,GAPS,IAAIC,EAAeR,EAAOE,SAQnCO,KAPW,IAAIC,EAQfC,WAPiB,IAAIC,EAQrBC,UAPgB,IAAIC,EAAkB,CACtCC,kBAAmBvB,EAAKuB,oBAAqB,IAO7CC,QAAS,OACThB,SACAiB,WAAYC,EACZC,WAAYC,EACV5B,EAAK6B,oBAjDuB,SAkD5B7B,EAAK8B,sBAjDyB,SAuDhC7B,IAAK8B,EACLR,kBAAmBS,EACnBH,mBAAoBI,EACpBH,qBAAsBI,KACnBC,GACDnC,EACJ,OAAOoC,EAAmB,IAAKD,EAAUlC,IAAKE,GAAeW,IAQzDL,EAAiBV,MACrBsC,IAEA,IAAIC,EAAUD,EACd,OAAa,CACX,MAAME,EAAYlC,EAASO,KAAK0B,EAAS,QACnCE,QAAeC,EAAKF,GAAWhC,MAAM,QAC3C,GAAIiC,GAAQE,cACV,MAAO,CAAEhC,QAAS4B,EAAS3B,OAAQ4B,EAAW1B,MAAM,GAEtD,MAAM8B,EAAStC,EAASuC,QAAQN,GAChC,GAAIK,IAAWL,EAAS,OACxBA,EAAUK,CACZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function n(n){return async function*(t){for await(const r of t)await n(r)&&(yield r)}}function t(n){return async t=>{for await(const r of t)if(await n(r))return r}}function
|
|
1
|
+
export{r as readableStreamToAsyncIterable}from"../chunks/readable-stream-CGuf8k1J.js";function n(n){return async function*(t){for await(const r of t)await n(r)&&(yield r)}}function t(n){return async t=>{for await(const r of t)if(await n(r))return r}}function e(n){return async function*(t){for await(const r of t){const t=await n(r);for await(const n of t)yield n}}}function o(n,t=Number.POSITIVE_INFINITY){if(Number.isNaN(t)||t<0)throw new RangeError("groupBy(limit): must be a non-negative number or Infinity");return async r=>{const e=new Map;let o=0;for await(const a of r){if(o>=t)throw new RangeError(`groupBy: exceeded limit of ${t} items`);const r=await n(a),i=e.get(r);i?i.push(a):e.set(r,[a]),o+=1}return e}}function a(n){return async function*(t){for await(const r of t)yield await n(r)}}function i(n,...t){return t.reduce((n,t)=>t(n),n)}function u(n){if(!Number.isInteger(n)||n<0)throw new RangeError("take(count): count must be a non-negative integer");return async function*(t){if(0===n)return;let r=0;for await(const e of t)if(yield e,r+=1,r>=n)return}}async function f(n,t=Number.POSITIVE_INFINITY){if(Number.isNaN(t)||t<0)throw new RangeError("toArray(limit): must be a non-negative number or Infinity");const r=[];for await(const e of n){if(r.length>=t)throw new RangeError(`toArray: exceeded limit of ${t} items`);r.push(e)}return r}export{n as filter,t as find,e as flatMap,o as groupBy,a as map,i as pipe,u as take,f as toArray};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/operators/filter.ts","../../../src/operators/find.ts","../../../src/operators/flat-map.ts","../../../src/operators/group-by.ts","../../../src/operators/map.ts","../../../src/operators/pipe.ts","../../../src/operators/take.ts","../../../src/operators/to-array.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["filter","predicate","async","source","value","find","flatMap","mapper","inner","item","groupBy","keyFn","limit","Number","POSITIVE_INFINITY","isNaN","RangeError","result","Map","count","key","bucket","get","push","set","map","pipe","initial","fns","reduce","acc","fn","take","isInteger","yielded","toArray","length"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/operators/filter.ts","../../../src/operators/find.ts","../../../src/operators/flat-map.ts","../../../src/operators/group-by.ts","../../../src/operators/map.ts","../../../src/operators/pipe.ts","../../../src/operators/take.ts","../../../src/operators/to-array.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["filter","predicate","async","source","value","find","flatMap","mapper","inner","item","groupBy","keyFn","limit","Number","POSITIVE_INFINITY","isNaN","RangeError","result","Map","count","key","bucket","get","push","set","map","pipe","initial","fns","reduce","acc","fn","take","isInteger","yielded","toArray","length"],"mappings":"sFAEM,SAAUA,EACdC,GAEA,OAAOC,gBAAiBC,GACtB,UAAW,MAAMC,KAASD,QACdF,EAAUG,WACZA,EAGZ,CACF,CCVM,SAAUC,EACdJ,GAEA,OAAOC,MAAOC,IACZ,UAAW,MAAMC,KAASD,EACxB,SAAUF,EAAUG,GAClB,OAAOA,EAKf,CCXM,SAAUE,EACdC,GAEA,OAAOL,gBAAiBC,GACtB,UAAW,MAAMC,KAASD,EAAQ,CAChC,MAAMK,QAAcD,EAAOH,GAC3B,UAAW,MAAMK,KAAQD,QACjBC,CAEV,CACF,CACF,CCXM,SAAUC,EACdC,EACAC,EAAgBC,OAAOC,mBAEvB,GAAID,OAAOE,MAAMH,IAAUA,EAAQ,EACjC,MAAM,IAAII,WAAW,6DAEvB,OAAOd,MAAOC,IACZ,MAAMc,EAAS,IAAIC,IACnB,IAAIC,EAAQ,EACZ,UAAW,MAAMf,KAASD,EAAQ,CAEhC,GAAIgB,GAASP,EACX,MAAM,IAAII,WAAW,8BAA8BJ,WAErD,MAAMQ,QAAYT,EAAMP,GAClBiB,EAASJ,EAAOK,IAAIF,GAEtBC,EACFA,EAAOE,KAAKnB,GAEZa,EAAOO,IAAIJ,EAAK,CAAChB,IAEnBe,GAAS,CACX,CACA,OAAOF,EAEX,CC3BM,SAAUQ,EACdlB,GAEA,OAAOL,gBAAiBC,GACtB,UAAW,MAAMC,KAASD,cACZI,EAAOH,EAEvB,CACF,UCqDgBsB,EAAKC,KAAqBC,GAExC,OAAOA,EAAIC,OAAO,CAACC,EAAKC,IAAOA,EAAGD,GAAMH,EAC1C,CClEM,SAAUK,EAAQb,GACtB,IAAKN,OAAOoB,UAAUd,IAAUA,EAAQ,EACtC,MAAM,IAAIH,WAAW,qDAEvB,OAAOd,gBAAiBC,GACtB,GAAc,IAAVgB,EAAa,OACjB,IAAIe,EAAU,EACd,UAAW,MAAM9B,KAASD,EAIxB,SAHMC,EACN8B,GAAW,EAEPA,GAAWf,EAAO,MAE1B,CACF,CCdOjB,eAAeiC,EACpBhC,EACAS,EAAgBC,OAAOC,mBAEvB,GAAID,OAAOE,MAAMH,IAAUA,EAAQ,EACjC,MAAM,IAAII,WAAW,6DAEvB,MAAMC,EAAc,GACpB,UAAW,MAAMb,KAASD,EAAQ,CAEhC,GAAIc,EAAOmB,QAAUxB,EACnB,MAAM,IAAII,WAAW,8BAA8BJ,WAErDK,EAAOM,KAAKnB,EACd,CACA,OAAOa,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export{f as applyChangeset,h as buildIndexFromTree,i as buildPack,k as computeChangeset,l as createCommit,n as diffTrees,r as enumeratePushObjects,s as fetchPack,u as getRepoRoot,D as materializeTree,E as mergeBase,L as readBlob,N as readIndex,P as readObject,Q as readShallow,S as readTree,V as resolveRef,X as synthesizeTreeFromIndex,_ as updateRef,$ as updateShallow,a2 as walkCommits,a3 as walkTree,a4 as walkWorkingTree,a5 as writeObject,a6 as writeSymbolicRef,a7 as writeTree}from"../chunks/index-BdV37p4e.js";import"../chunks/error-BN9rdQ33.js";import"../chunks/readable-stream-CGuf8k1J.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/transport/with-auth.ts","../../../src/transport/with-logging.ts","../../../src/transport/with-retry.ts"],"sourcesContent":[null,null,null],"names":["TEXT_ENCODER","TextEncoder","withAuth","config","type","token","TypeError","validateBearer","username","includes","validateBasic","validateConfig","inner","request","async","req","Object","keys","headers","some","k","toLowerCase","value","s","bytes","encode","bin","i","byteLength","String","fromCharCode","btoa","base64Utf8","password","header","resolveHeader","authorization","addAuthorization","FORCED_REDACT","Set","REDACT_QUERY_KEYS","redactHeaders","extra","extraLower","map","h","out","v","entries","low","has","safeLog","logger","event","log","errorMessage","err","Error","message","withLogging","now","performance","extraRedact","redactedUrl","url","parsed","URL","keysToDelete","key","searchParams","test","push","delete","toString","redactUrl","safeHeaders","start","kind","method","bodyBytes","body","buildRequestEvent","res","safeResHeaders","elapsedMs","statusCode","buildResponseEvent","buildErrorEvent","defaultIsRetryable","error","response","DOMException","name","undefined","tryCancelBody","cancel","catch","defaultDelay","ms","signal","aborted","Promise","reject","reason","resolve","timer","onAbort","clearTimeout","setTimeout","removeEventListener","addEventListener","once","computeDelay","attempt","baseMs","jitter","clamped","Math","min","backoff","maxDelayMs","factor","random","floor","performAttempt","finalize","outcome","shouldStop","ctx","isRetryable","e","isLast","withRetry","attempts","Number","isFinite","isInteger","RangeError","validateAttempts","validateBaseMs","base","validateMaxDelay","validateJitter","delay"],"mappings":"AAGA,MAAMA,EAAe,IAAIC,YAgDZC,EAAYC,IAxBF,CAACA,IACF,WAAhBA,EAAOC,MAXU,CAACC,IACtB,GAAc,KAAVA,EAAc,MAAM,IAAIC,UAAU,6BAURC,CAAeJ,EAAOE,OAChC,UAAhBF,EAAO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IAAKD,EACLqB,YACA7B,aAAcA,EAAaC,KAkBE+B,CAAgBxB,EAAaH,IAAQgB,EAAOpB,IAC7DA,CACR,MCrFOgC,EAAqC,EAAGC,QAAOC,eAC1D,OAAIA,KAJwBnE,EAIemE,EAASL,YAHhD,KAAQ9D,EAAI,KAAOA,EAAI,KAAc,MAANA,GAAaA,GAAK,OAIjDkE,aAAiBE,cAA+B,eAAfF,EAAMG,YAC1BC,IAAVJ,EANoB,IAAClE,GA4CxBuE,EAAiBd,IACrB,GAAKA,EACL,IACEA,EAAKe,SAASC,MAAM,OAGtB,CAAE,MAEF,GAGWC,EAAe,CAACC,EAAYC,IACnCA,GAAQC,QAAgBC,QAAQC,OAAOH,EAAOI,QACvC,IAAPL,EAAiBG,QAAQG,UACtB,IAAIH,QAAc,CAACG,EAASF,KACjC,IAAIG,EACJ,MAAMC,EAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/transport/with-auth.ts","../../../src/transport/with-logging.ts","../../../src/transport/with-retry.ts"],"sourcesContent":[null,null,null],"names":["TEXT_ENCODER","TextEncoder","withAuth","config","type","token","TypeError","validateBearer","username","includes","validateBasic","validateConfig","inner","request","async","req","Object","keys","headers","some","k","toLowerCase","value","s","bytes","encode","bin","i","byteLength","String","fromCharCode","btoa","base64Utf8","password","header","resolveHeader","authorization","addAuthorization","FORCED_REDACT","Set","REDACT_QUERY_KEYS","redactHeaders","extra","extraLower","map","h","out","v","entries","low","has","safeLog","logger","event","log","errorMessage","err","Error","message","withLogging","now","performance","extraRedact","redactedUrl","url","parsed","URL","keysToDelete","key","searchParams","test","push","delete","toString","redactUrl","safeHeaders","start","kind","method","bodyBytes","body","buildRequestEvent","res","safeResHeaders","elapsedMs","statusCode","buildResponseEvent","buildErrorEvent","defaultIsRetryable","error","response","DOMException","name","undefined","tryCancelBody","cancel","catch","defaultDelay","ms","signal","aborted","Promise","reject","reason","resolve","timer","onAbort","clearTimeout","setTimeout","removeEventListener","addEventListener","once","computeDelay","attempt","baseMs","jitter","clamped","Math","min","backoff","maxDelayMs","factor","random","floor","performAttempt","finalize","outcome","shouldStop","ctx","isRetryable","e","isLast","withRetry","attempts","Number","isFinite","isInteger","RangeError","validateAttempts","validateBaseMs","base","validateMaxDelay","validateJitter","delay"],"mappings":"AAGA,MAAMA,EAAe,IAAIC,YAgDZC,EAAYC,IAxBF,CAACA,IACF,WAAhBA,EAAOC,MAXU,CAACC,IACtB,GAAc,KAAVA,EAAc,MAAM,IAAIC,UAAU,6BAURC,CAAeJ,EAAOE,OAChC,UAAhBF,EAAOC,MARS,CAACI,IACrB,GAAIA,EAASC,SAAS,KACpB,MAAM,IAAIH,UAAU,kDAMOI,CAAcP,EAAOK,WAuBlDG,CAAeR,GACPS,IAAoB,CAC1BC,QAASC,MAAOC,IACd,GAxCJC,OAAOC,KAwCeF,EAAIG,SAxCLC,KAAMC,GAA0B,kBAApBA,EAAEC,eAwCC,OAAOT,EAAMC,QAAQE,GACrD,MAAMO,OApBUR,OAAOX,EAAoBY,KAC/C,GAAoB,WAAhBZ,EAAOC,KAAmB,MALmB,UAKID,EAAOE,QAC5D,GAAoB,UAAhBF,EAAOC,KAAkB,MAJ7B,SA7BiB,CAACmB,IAClB,MAAMC,EAAQxB,EAAayB,OAAOF,GAClC,IAAIG,EAAM,GACV,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAMI,WAAYD,GAAK,EACzCD,GAAOG,OAAOC,aAAaN,EAAMG,IAAM,GAEzC,OAAOI,KAAKL,IAuBHM,CAAW,GAI+B7B,EAAOK,YAAUL,EAAO8B,cAC3E,MAAMX,QAAcnB,EAAO+B,OAAOnB,GAClC,GAAc,KAAVO,SAAgBA,EAClB,MAAM,IAAIhB,UAAU,yCAEtB,OAAOgB,GAaiBa,CAAchC,EAAQY,GAC1C,OAAOH,EAAMC,QAXM,EAACE,EAAkBO,KAAa,IACpDP,EACHG,QAAS,IAAKH,EAAIG,QAASkB,cAAed,KASjBe,CAAiBtB,EAAKO,QCtD3C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,KACCmB,OAAOC,SAASpB,IAAWA,EAAS,GAAKA,EAAS,GACrD,MAAM,IAAIsB,WAAW,wCAmDvBK,CAAe3I,EAAOgH,SAwCtBxG,CAAeR,GACf,MAAM8H,EAAc9H,EAAO8H,aAAezC,EACpCuD,EAAQ5I,EAAO4I,OAAS9C,EAC9B,OAAQrF,IAiBC,CAAEC,QAhBOC,MAAOC,IACrB,GAAIA,EAAIoF,QAAQC,QAAS,MAAMrF,EAAIoF,OAAOI,OAC1C,IAAIuB,EAA0B,CAAA,EAC9B,IAAK,IAAIb,EAAU,EAAGA,GAAW9G,EAAOkI,SAAUpB,GAAW,EAAG,CAO9D,GANAa,QAAgBF,EAAehH,EAAOG,GAMlCgH,EALwB,CAC1Bd,UACAkB,OAAQlB,IAAY9G,EAAOkI,SAC3BP,WAEkBG,GAAc,OAAOJ,EAASC,QACzBjC,IAArBiC,EAAQpC,UAAwBI,EAAcgC,EAAQpC,SAASV,YAC7D+D,EAAM/B,EAAaC,EAAS9G,GAASY,EAAIoF,OACjD,CACA,OAAO0B,EAASC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, f as FileSystem, e as FileStat, D as DirEntry, F as FileHandle, H as HashService, g as Hasher } from '../../chunks/context-D84z1i5F.cjs';
|
|
2
|
+
import { b as HttpTransport, H as HttpRequest, a as HttpResponse } from '../../chunks/http-transport-DirKfK2S.cjs';
|
|
3
3
|
|
|
4
4
|
interface BrowserAdapterOptions {
|
|
5
5
|
readonly rootHandle: FileSystemDirectoryHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, f as FileSystem, e as FileStat, D as DirEntry, F as FileHandle, H as HashService, g as Hasher } from '../../chunks/context-o5TPfMB2.js';
|
|
2
|
+
import { b as HttpTransport, H as HttpRequest, a as HttpResponse } from '../../chunks/http-transport-DirKfK2S.js';
|
|
3
3
|
|
|
4
4
|
interface BrowserAdapterOptions {
|
|
5
5
|
readonly rootHandle: FileSystemDirectoryHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, f as FileSystem, e as FileStat, D as DirEntry, F as FileHandle, H as HashService, g as Hasher } from '../../chunks/context-D84z1i5F.cjs';
|
|
2
|
+
import { b as HttpTransport, H as HttpRequest, a as HttpResponse } from '../../chunks/http-transport-DirKfK2S.cjs';
|
|
3
3
|
|
|
4
4
|
interface MemoryAdapterOptions {
|
|
5
5
|
readonly files?: Readonly<Record<string, Uint8Array>>;
|
|
@@ -7,6 +7,8 @@ interface MemoryAdapterOptions {
|
|
|
7
7
|
readonly signal?: AbortSignal;
|
|
8
8
|
readonly deltaCacheMaxBytes?: number;
|
|
9
9
|
readonly deltaCacheMaxEntries?: number;
|
|
10
|
+
/** Optional home directory exposed via `ctx.layout.homeDir` (default: undefined). */
|
|
11
|
+
readonly homeDir?: string;
|
|
10
12
|
}
|
|
11
13
|
declare function createMemoryContext(options?: MemoryAdapterOptions): Context;
|
|
12
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, f as FileSystem, e as FileStat, D as DirEntry, F as FileHandle, H as HashService, g as Hasher } from '../../chunks/context-o5TPfMB2.js';
|
|
2
|
+
import { b as HttpTransport, H as HttpRequest, a as HttpResponse } from '../../chunks/http-transport-DirKfK2S.js';
|
|
3
3
|
|
|
4
4
|
interface MemoryAdapterOptions {
|
|
5
5
|
readonly files?: Readonly<Record<string, Uint8Array>>;
|
|
@@ -7,6 +7,8 @@ interface MemoryAdapterOptions {
|
|
|
7
7
|
readonly signal?: AbortSignal;
|
|
8
8
|
readonly deltaCacheMaxBytes?: number;
|
|
9
9
|
readonly deltaCacheMaxEntries?: number;
|
|
10
|
+
/** Optional home directory exposed via `ctx.layout.homeDir` (default: undefined). */
|
|
11
|
+
readonly homeDir?: string;
|
|
10
12
|
}
|
|
11
13
|
declare function createMemoryContext(options?: MemoryAdapterOptions): Context;
|
|
12
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, f as FileSystem, e as FileStat, D as DirEntry, F as FileHandle, H as HashService, g as Hasher } from '../../chunks/context-D84z1i5F.cjs';
|
|
2
|
+
import { b as HttpTransport, H as HttpRequest, a as HttpResponse } from '../../chunks/http-transport-DirKfK2S.cjs';
|
|
3
3
|
|
|
4
4
|
interface NodeAdapterOptions {
|
|
5
5
|
readonly workDir: string;
|
|
@@ -25,9 +25,121 @@ declare class NodeCompressor implements Compressor {
|
|
|
25
25
|
createInflateStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Injectable surface for the Node `fs/promises` calls that `NodeFileSystem`
|
|
30
|
+
* needs. Production code uses `realFsOps`; tests inject a partial fake.
|
|
31
|
+
*
|
|
32
|
+
* Why this exists:
|
|
33
|
+
* - `vi.mock('node:fs/promises')` is file-scoped and patches the module
|
|
34
|
+
* system. It dumps every test that "needs to mock fs" into one bucket
|
|
35
|
+
* (the previous `node-file-system-containment.test.ts` smell).
|
|
36
|
+
* - Dependency injection at the adapter constructor makes the dependency
|
|
37
|
+
* explicit, scoped per-instance, and cross-platform by construction —
|
|
38
|
+
* tests don't depend on Vitest's mock machinery to swap the fs surface.
|
|
39
|
+
* - The interface is a `Pick` of `fsPromises` so production code can just
|
|
40
|
+
* pass the real module without writing any glue. Tests pass a fake
|
|
41
|
+
* object that satisfies the subset they exercise.
|
|
42
|
+
*
|
|
43
|
+
* @internal — not re-exported from `src/adapters/node/index.ts`.
|
|
44
|
+
*/
|
|
45
|
+
type FsOperations = Pick<typeof fsPromises, 'chmod' | 'lstat' | 'mkdir' | 'open' | 'readdir' | 'readFile' | 'readlink' | 'realpath' | 'rename' | 'rm' | 'rmdir' | 'stat' | 'symlink' | 'writeFile'>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Path-policy abstraction.
|
|
49
|
+
*
|
|
50
|
+
* Encapsulates every platform-aware path operation the Node adapter needs.
|
|
51
|
+
* Production code uses `nativePolicy` (host-matching). Tests inject
|
|
52
|
+
* `windowsPolicy` or `posixPolicy` to simulate either platform on any host,
|
|
53
|
+
* eliminating the "host vs. simulated platform" confusion that was
|
|
54
|
+
* leaking into containment / cache / errno code paths.
|
|
55
|
+
*
|
|
56
|
+
* Design notes:
|
|
57
|
+
* - `sep` is the platform separator string, used for prefix containment.
|
|
58
|
+
* - `caseInsensitive` drives `normalizeForCompare`; Windows + macOS HFS+
|
|
59
|
+
* could share this in theory, but tsgit treats macOS as case-sensitive
|
|
60
|
+
* per Git's `core.ignorecase` default and POSIX convention.
|
|
61
|
+
* - `rootOf` returns the volume/drive prefix produced by `path.parse`.
|
|
62
|
+
* Examples: `/` on POSIX, `'C:\\'` on Windows, `'\\\\server\\share\\'`
|
|
63
|
+
* for UNC paths.
|
|
64
|
+
* - The interface is *only* the subset NodeFileSystem actually needs; we
|
|
65
|
+
* intentionally do not expose all of `nodePath`'s surface so callers
|
|
66
|
+
* can't smuggle host-bound calls back in.
|
|
67
|
+
*/
|
|
68
|
+
interface PathPolicy {
|
|
69
|
+
readonly sep: '\\' | '/';
|
|
70
|
+
readonly caseInsensitive: boolean;
|
|
71
|
+
isAbsolute(path: string): boolean;
|
|
72
|
+
resolve(...parts: string[]): string;
|
|
73
|
+
join(...parts: string[]): string;
|
|
74
|
+
dirname(path: string): string;
|
|
75
|
+
basename(path: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the volume/drive prefix produced by `path.parse(p).root`.
|
|
78
|
+
* POSIX: `/` for absolute, `''` for relative.
|
|
79
|
+
* Windows: `'C:\\'`, `'\\\\server\\share\\'`, or `''` for relative.
|
|
80
|
+
*/
|
|
81
|
+
rootOf(path: string): string;
|
|
82
|
+
/** Case-fold on case-insensitive platforms; identity otherwise. */
|
|
83
|
+
normalizeForCompare(path: string): string;
|
|
84
|
+
}
|
|
85
|
+
|
|
28
86
|
declare class NodeFileSystem implements FileSystem {
|
|
29
87
|
private readonly rootDir;
|
|
30
|
-
|
|
88
|
+
private readonly pathPolicy;
|
|
89
|
+
private readonly fsOps;
|
|
90
|
+
/**
|
|
91
|
+
* Memoised realpath of an *existing* parent directory, keyed by the raw
|
|
92
|
+
* (pre-realpath) parent path. Populated on every cache-miss inside
|
|
93
|
+
* `resolveForCreation` so a clone/checkout that writes N files into the
|
|
94
|
+
* same tree pays the realpath walk-up once per parent rather than once
|
|
95
|
+
* per file.
|
|
96
|
+
*
|
|
97
|
+
* Invariants:
|
|
98
|
+
* - Only EXISTING parents are cached. ENOENT walks fall back to
|
|
99
|
+
* `realpathNearestExisting` and are never recorded.
|
|
100
|
+
* - `rmRecursive` and `rename` clear the cache, which is correct (the
|
|
101
|
+
* parent realpath may have changed) and cheap (the cache holds at
|
|
102
|
+
* most a handful of small strings).
|
|
103
|
+
*/
|
|
104
|
+
private readonly creationParentCache;
|
|
105
|
+
/**
|
|
106
|
+
* Lazy long-name canonicalisation of `rootDir` for containment checks.
|
|
107
|
+
* Promise so concurrent first calls share one `realpath`; cleared on
|
|
108
|
+
* rejection so a transient ENOENT can be retried.
|
|
109
|
+
*/
|
|
110
|
+
private canonicalRootPromise;
|
|
111
|
+
/**
|
|
112
|
+
* Memoised result of `pathPolicy.normalizeForCompare(rootDir)`. The
|
|
113
|
+
* rootDir is `readonly` for the adapter's lifetime, so a single
|
|
114
|
+
* normalisation is amortised across every containment check.
|
|
115
|
+
*/
|
|
116
|
+
private normalizedRootDir;
|
|
117
|
+
/**
|
|
118
|
+
* Memoised result of `pathPolicy.normalizeForCompare(canonicalRoot)`.
|
|
119
|
+
* Tracked alongside the canonical-root promise: when the promise
|
|
120
|
+
* resolves we cache the normalised form once. The promise's
|
|
121
|
+
* rejection-clears-cache rule means a transient ENOENT also clears
|
|
122
|
+
* this field (so the next call re-normalises against the retried
|
|
123
|
+
* canonical root).
|
|
124
|
+
*/
|
|
125
|
+
private normalizedCanonicalRoot;
|
|
126
|
+
constructor(rootDir: string, pathPolicy?: PathPolicy, fsOps?: FsOperations);
|
|
127
|
+
private getNormalizedRootDir;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the cached normalised canonical root. Caller must have
|
|
130
|
+
* `await this.getCanonicalRoot()` immediately prior — the cache is
|
|
131
|
+
* populated by the promise's success arm and cleared on rejection, so
|
|
132
|
+
* a successful `await` guarantees the field is set.
|
|
133
|
+
*
|
|
134
|
+
* Kept synchronous (vs `async` + `await this.getCanonicalRoot()`
|
|
135
|
+
* inside) so the hot path doesn't pay an extra microtask suspension
|
|
136
|
+
* per containment check on a settled promise. The `!` is the only
|
|
137
|
+
* machine-readable form of "trust the post-await invariant"; the
|
|
138
|
+
* private `await getCanonicalRoot()` discipline at every call site is
|
|
139
|
+
* what makes it safe.
|
|
140
|
+
*/
|
|
141
|
+
private getResolvedNormalizedCanonicalRoot;
|
|
142
|
+
private getCanonicalRoot;
|
|
31
143
|
read: (path: string) => Promise<Uint8Array>;
|
|
32
144
|
readSlice: (path: string, offset: number, length: number) => Promise<Uint8Array>;
|
|
33
145
|
readUtf8: (path: string) => Promise<string>;
|
|
@@ -46,8 +158,10 @@ declare class NodeFileSystem implements FileSystem {
|
|
|
46
158
|
chmod: (path: string, mode: number) => Promise<void>;
|
|
47
159
|
rmRecursive: (path: string) => Promise<void>;
|
|
48
160
|
openWithNoFollow: (path: string, mode: "read" | "write") => Promise<FileHandle>;
|
|
161
|
+
private isSymlinkLeaf;
|
|
49
162
|
private removeTree;
|
|
50
163
|
private resolveForCreation;
|
|
164
|
+
private realpathForCreation;
|
|
51
165
|
private resolveForMode;
|
|
52
166
|
private checkContainment;
|
|
53
167
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, f as FileSystem, e as FileStat, D as DirEntry, F as FileHandle, H as HashService, g as Hasher } from '../../chunks/context-o5TPfMB2.js';
|
|
2
|
+
import { b as HttpTransport, H as HttpRequest, a as HttpResponse } from '../../chunks/http-transport-DirKfK2S.js';
|
|
3
3
|
|
|
4
4
|
interface NodeAdapterOptions {
|
|
5
5
|
readonly workDir: string;
|
|
@@ -25,9 +25,121 @@ declare class NodeCompressor implements Compressor {
|
|
|
25
25
|
createInflateStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Injectable surface for the Node `fs/promises` calls that `NodeFileSystem`
|
|
30
|
+
* needs. Production code uses `realFsOps`; tests inject a partial fake.
|
|
31
|
+
*
|
|
32
|
+
* Why this exists:
|
|
33
|
+
* - `vi.mock('node:fs/promises')` is file-scoped and patches the module
|
|
34
|
+
* system. It dumps every test that "needs to mock fs" into one bucket
|
|
35
|
+
* (the previous `node-file-system-containment.test.ts` smell).
|
|
36
|
+
* - Dependency injection at the adapter constructor makes the dependency
|
|
37
|
+
* explicit, scoped per-instance, and cross-platform by construction —
|
|
38
|
+
* tests don't depend on Vitest's mock machinery to swap the fs surface.
|
|
39
|
+
* - The interface is a `Pick` of `fsPromises` so production code can just
|
|
40
|
+
* pass the real module without writing any glue. Tests pass a fake
|
|
41
|
+
* object that satisfies the subset they exercise.
|
|
42
|
+
*
|
|
43
|
+
* @internal — not re-exported from `src/adapters/node/index.ts`.
|
|
44
|
+
*/
|
|
45
|
+
type FsOperations = Pick<typeof fsPromises, 'chmod' | 'lstat' | 'mkdir' | 'open' | 'readdir' | 'readFile' | 'readlink' | 'realpath' | 'rename' | 'rm' | 'rmdir' | 'stat' | 'symlink' | 'writeFile'>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Path-policy abstraction.
|
|
49
|
+
*
|
|
50
|
+
* Encapsulates every platform-aware path operation the Node adapter needs.
|
|
51
|
+
* Production code uses `nativePolicy` (host-matching). Tests inject
|
|
52
|
+
* `windowsPolicy` or `posixPolicy` to simulate either platform on any host,
|
|
53
|
+
* eliminating the "host vs. simulated platform" confusion that was
|
|
54
|
+
* leaking into containment / cache / errno code paths.
|
|
55
|
+
*
|
|
56
|
+
* Design notes:
|
|
57
|
+
* - `sep` is the platform separator string, used for prefix containment.
|
|
58
|
+
* - `caseInsensitive` drives `normalizeForCompare`; Windows + macOS HFS+
|
|
59
|
+
* could share this in theory, but tsgit treats macOS as case-sensitive
|
|
60
|
+
* per Git's `core.ignorecase` default and POSIX convention.
|
|
61
|
+
* - `rootOf` returns the volume/drive prefix produced by `path.parse`.
|
|
62
|
+
* Examples: `/` on POSIX, `'C:\\'` on Windows, `'\\\\server\\share\\'`
|
|
63
|
+
* for UNC paths.
|
|
64
|
+
* - The interface is *only* the subset NodeFileSystem actually needs; we
|
|
65
|
+
* intentionally do not expose all of `nodePath`'s surface so callers
|
|
66
|
+
* can't smuggle host-bound calls back in.
|
|
67
|
+
*/
|
|
68
|
+
interface PathPolicy {
|
|
69
|
+
readonly sep: '\\' | '/';
|
|
70
|
+
readonly caseInsensitive: boolean;
|
|
71
|
+
isAbsolute(path: string): boolean;
|
|
72
|
+
resolve(...parts: string[]): string;
|
|
73
|
+
join(...parts: string[]): string;
|
|
74
|
+
dirname(path: string): string;
|
|
75
|
+
basename(path: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the volume/drive prefix produced by `path.parse(p).root`.
|
|
78
|
+
* POSIX: `/` for absolute, `''` for relative.
|
|
79
|
+
* Windows: `'C:\\'`, `'\\\\server\\share\\'`, or `''` for relative.
|
|
80
|
+
*/
|
|
81
|
+
rootOf(path: string): string;
|
|
82
|
+
/** Case-fold on case-insensitive platforms; identity otherwise. */
|
|
83
|
+
normalizeForCompare(path: string): string;
|
|
84
|
+
}
|
|
85
|
+
|
|
28
86
|
declare class NodeFileSystem implements FileSystem {
|
|
29
87
|
private readonly rootDir;
|
|
30
|
-
|
|
88
|
+
private readonly pathPolicy;
|
|
89
|
+
private readonly fsOps;
|
|
90
|
+
/**
|
|
91
|
+
* Memoised realpath of an *existing* parent directory, keyed by the raw
|
|
92
|
+
* (pre-realpath) parent path. Populated on every cache-miss inside
|
|
93
|
+
* `resolveForCreation` so a clone/checkout that writes N files into the
|
|
94
|
+
* same tree pays the realpath walk-up once per parent rather than once
|
|
95
|
+
* per file.
|
|
96
|
+
*
|
|
97
|
+
* Invariants:
|
|
98
|
+
* - Only EXISTING parents are cached. ENOENT walks fall back to
|
|
99
|
+
* `realpathNearestExisting` and are never recorded.
|
|
100
|
+
* - `rmRecursive` and `rename` clear the cache, which is correct (the
|
|
101
|
+
* parent realpath may have changed) and cheap (the cache holds at
|
|
102
|
+
* most a handful of small strings).
|
|
103
|
+
*/
|
|
104
|
+
private readonly creationParentCache;
|
|
105
|
+
/**
|
|
106
|
+
* Lazy long-name canonicalisation of `rootDir` for containment checks.
|
|
107
|
+
* Promise so concurrent first calls share one `realpath`; cleared on
|
|
108
|
+
* rejection so a transient ENOENT can be retried.
|
|
109
|
+
*/
|
|
110
|
+
private canonicalRootPromise;
|
|
111
|
+
/**
|
|
112
|
+
* Memoised result of `pathPolicy.normalizeForCompare(rootDir)`. The
|
|
113
|
+
* rootDir is `readonly` for the adapter's lifetime, so a single
|
|
114
|
+
* normalisation is amortised across every containment check.
|
|
115
|
+
*/
|
|
116
|
+
private normalizedRootDir;
|
|
117
|
+
/**
|
|
118
|
+
* Memoised result of `pathPolicy.normalizeForCompare(canonicalRoot)`.
|
|
119
|
+
* Tracked alongside the canonical-root promise: when the promise
|
|
120
|
+
* resolves we cache the normalised form once. The promise's
|
|
121
|
+
* rejection-clears-cache rule means a transient ENOENT also clears
|
|
122
|
+
* this field (so the next call re-normalises against the retried
|
|
123
|
+
* canonical root).
|
|
124
|
+
*/
|
|
125
|
+
private normalizedCanonicalRoot;
|
|
126
|
+
constructor(rootDir: string, pathPolicy?: PathPolicy, fsOps?: FsOperations);
|
|
127
|
+
private getNormalizedRootDir;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the cached normalised canonical root. Caller must have
|
|
130
|
+
* `await this.getCanonicalRoot()` immediately prior — the cache is
|
|
131
|
+
* populated by the promise's success arm and cleared on rejection, so
|
|
132
|
+
* a successful `await` guarantees the field is set.
|
|
133
|
+
*
|
|
134
|
+
* Kept synchronous (vs `async` + `await this.getCanonicalRoot()`
|
|
135
|
+
* inside) so the hot path doesn't pay an extra microtask suspension
|
|
136
|
+
* per containment check on a settled promise. The `!` is the only
|
|
137
|
+
* machine-readable form of "trust the post-await invariant"; the
|
|
138
|
+
* private `await getCanonicalRoot()` discipline at every call site is
|
|
139
|
+
* what makes it safe.
|
|
140
|
+
*/
|
|
141
|
+
private getResolvedNormalizedCanonicalRoot;
|
|
142
|
+
private getCanonicalRoot;
|
|
31
143
|
read: (path: string) => Promise<Uint8Array>;
|
|
32
144
|
readSlice: (path: string, offset: number, length: number) => Promise<Uint8Array>;
|
|
33
145
|
readUtf8: (path: string) => Promise<string>;
|
|
@@ -46,8 +158,10 @@ declare class NodeFileSystem implements FileSystem {
|
|
|
46
158
|
chmod: (path: string, mode: number) => Promise<void>;
|
|
47
159
|
rmRecursive: (path: string) => Promise<void>;
|
|
48
160
|
openWithNoFollow: (path: string, mode: "read" | "write") => Promise<FileHandle>;
|
|
161
|
+
private isSymlinkLeaf;
|
|
49
162
|
private removeTree;
|
|
50
163
|
private resolveForCreation;
|
|
164
|
+
private realpathForCreation;
|
|
51
165
|
private resolveForMode;
|
|
52
166
|
private checkContainment;
|
|
53
167
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as HttpTransport } from './http-transport-DirKfK2S.cjs';
|
|
2
2
|
|
|
3
3
|
interface InflateStreamResult {
|
|
4
4
|
/** The fully-inflated output bytes. */
|
|
@@ -83,16 +83,16 @@ interface FileSystem {
|
|
|
83
83
|
/**
|
|
84
84
|
* Write bytes to file. Fails with FILE_EXISTS if the file already exists (exclusive create).
|
|
85
85
|
*
|
|
86
|
-
* Contract obligations
|
|
86
|
+
* Contract obligations:
|
|
87
87
|
* - **Parent-directory creation:** the adapter MUST ensure parent directories exist before the
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
88
|
+
* exclusive write. Equivalent to `mkdir -p dirname(path)` before `open(path, O_EXCL)`. If the
|
|
89
|
+
* parent is removed between the implicit mkdir and the open (e.g. concurrent `git gc` prunes
|
|
90
|
+
* the fanout), the adapter retries once: re-create the parent, re-attempt the open. On a second
|
|
91
|
+
* ENOENT the error propagates as FILE_NOT_FOUND.
|
|
92
92
|
* - **Symlink-safe ancestor check:** the adapter MUST reject writes where any ancestor directory
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
93
|
+
* of `path` is a symbolic link whose resolved target is outside the containment root. This
|
|
94
|
+
* closes the attack where an attacker replaces `objects/xx/` with a symlink pointing elsewhere.
|
|
95
|
+
* Implementation: lstat-walk the ancestor chain, or use `openat`-style relative opens.
|
|
96
96
|
*/
|
|
97
97
|
readonly writeExclusive: (path: string, data: Uint8Array) => Promise<void>;
|
|
98
98
|
/** Write UTF-8 string to file, creating parent directories as needed. */
|
|
@@ -140,7 +140,7 @@ interface FileSystem {
|
|
|
140
140
|
* - Node: `fs.open(path, O_NOFOLLOW | (mode === 'write' ? O_WRONLY : O_RDONLY))`.
|
|
141
141
|
* - Memory: rejects with `PERMISSION_DENIED` when the leaf is a memory symlink entry.
|
|
142
142
|
* - Browser OPFS: throws `UNSUPPORTED_OPERATION` (OPFS has no symlinks; callers can
|
|
143
|
-
*
|
|
143
|
+
* fall back to a plain `read`/`write` because the no-follow guarantee holds vacuously).
|
|
144
144
|
*
|
|
145
145
|
* Throws `FILE_NOT_FOUND` if the leaf does not exist (in `read` mode).
|
|
146
146
|
* Throws `PERMISSION_DENIED` if the leaf is a symlink.
|
|
@@ -212,7 +212,7 @@ interface LruCache<V> {
|
|
|
212
212
|
* `Logger` in `transport/types.ts`, which is event-based and HTTP-shaped.
|
|
213
213
|
*
|
|
214
214
|
* The facade wraps user-supplied loggers with sanitization at construction time
|
|
215
|
-
*
|
|
215
|
+
* . Implementations should be tolerant of high call
|
|
216
216
|
* frequency and MUST NOT throw — a throwing logger crashes nothing.
|
|
217
217
|
*/
|
|
218
218
|
interface Logger {
|
|
@@ -225,8 +225,8 @@ interface Logger {
|
|
|
225
225
|
declare const noopLogger: Logger;
|
|
226
226
|
/**
|
|
227
227
|
* Wrap a user-supplied logger so every `message` + every string value in the
|
|
228
|
-
* `context` object passes through `sanitize()`
|
|
229
|
-
* the sink.
|
|
228
|
+
* `context` object passes through `sanitize()` before reaching
|
|
229
|
+
* the sink. the facade applies this at construction time so no
|
|
230
230
|
* downstream caller ever feeds raw control bytes to a user-controlled sink.
|
|
231
231
|
*
|
|
232
232
|
* Methods that the user did not supply are absent on the wrapper (preserves
|
|
@@ -237,7 +237,7 @@ declare const wrapLoggerSanitizer: (logger: Logger) => Logger;
|
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
239
|
* Progress reporter shape consumed by long-running commands. The facade
|
|
240
|
-
*
|
|
240
|
+
* accepts a user-supplied implementation via
|
|
241
241
|
* `OpenRepositoryOptions.progress` and plumbs it onto `Context.progress`.
|
|
242
242
|
*
|
|
243
243
|
* Reporters are synchronous and fire-and-forget. The facade wraps every call
|
|
@@ -261,20 +261,28 @@ interface ProgressReporter {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
|
-
* Repository physical layout — where the working tree and
|
|
265
|
-
* Renamed in
|
|
264
|
+
* Repository physical layout — where the working tree and.git directory live.
|
|
265
|
+
* Renamed in from the previous `RepositoryConfig` (port-tier) to free that
|
|
266
266
|
* name for the facade-tier `RepositoryConfig` shape (auth/parallelism/etc.).
|
|
267
267
|
*/
|
|
268
268
|
interface RepositoryLayout {
|
|
269
269
|
/** Absolute path to the repository root (working tree). */
|
|
270
270
|
readonly workDir: string;
|
|
271
|
-
/** Absolute path to the
|
|
271
|
+
/** Absolute path to the.git directory (usually `${workDir}/.git`, but may differ for bare repos or worktrees). */
|
|
272
272
|
readonly gitDir: string;
|
|
273
273
|
/** Whether this is a bare repository. */
|
|
274
274
|
readonly bare: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Home directory for `~`-expansion in config-driven paths (e.g.
|
|
277
|
+
* `core.excludesFile = ~/.config/git/ignore`). Populated by the node
|
|
278
|
+
* shim from `os.homedir()`; memory adapter accepts an option; browser
|
|
279
|
+
* leaves it `undefined`. When `undefined`, loaders that need home
|
|
280
|
+
* expansion treat the source as missing.
|
|
281
|
+
*/
|
|
282
|
+
readonly homeDir?: string;
|
|
275
283
|
}
|
|
276
284
|
/**
|
|
277
|
-
* Author / committer identity
|
|
285
|
+
* Author / committer identity shape.
|
|
278
286
|
*/
|
|
279
287
|
interface AuthorIdentity {
|
|
280
288
|
readonly name: string;
|
|
@@ -292,7 +300,7 @@ type AuthStrategy = {
|
|
|
292
300
|
readonly password: string;
|
|
293
301
|
};
|
|
294
302
|
/**
|
|
295
|
-
* Facade-tier configuration.
|
|
303
|
+
* Facade-tier configuration. introduces this shape; it carries the
|
|
296
304
|
* auth/parallelism/SSRF/network options the facade plumbs into network-pipeline.
|
|
297
305
|
* All fields are optional — primitives and commands consult only the keys they need.
|
|
298
306
|
*/
|
|
@@ -304,7 +312,17 @@ interface RepositoryConfig {
|
|
|
304
312
|
readonly upstreamRef?: RefName;
|
|
305
313
|
readonly allowInsecure?: boolean;
|
|
306
314
|
readonly allowPrivateNetworks?: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* Hard cap (bytes) on a single pack body buffered in memory by `fetchPack`.
|
|
317
|
+
* Server-controlled byte counts above this raise `PACK_TOO_LARGE`. Default
|
|
318
|
+
* 512 MiB. Lower it for hardened deployments that clone only small repos.
|
|
319
|
+
*/
|
|
307
320
|
readonly maxResponseBytes?: number;
|
|
321
|
+
/**
|
|
322
|
+
* Hard cap on the entry-count field declared in a received pack header.
|
|
323
|
+
* Server-controlled `uint32` values above this raise `PACK_TOO_LARGE` before
|
|
324
|
+
* `fetchPack` allocates per-entry state. Default 50_000_000.
|
|
325
|
+
*/
|
|
308
326
|
readonly maxObjectsPerPack?: number;
|
|
309
327
|
readonly detectRenames?: boolean;
|
|
310
328
|
readonly breakStaleLockMs?: number;
|
|
@@ -350,5 +368,5 @@ interface CreateContextParts {
|
|
|
350
368
|
/** Assemble a frozen Context from its constituent ports + layout. */
|
|
351
369
|
declare function createContext(parts: CreateContextParts): Context;
|
|
352
370
|
|
|
353
|
-
export { ObjectId as O,
|
|
354
|
-
export type { AuthStrategy as A, Compressor as C, DirEntry as D,
|
|
371
|
+
export { ObjectId as O, RefName as R, FilePath as d, createContext as j, noopLogger as n, wrapLoggerSanitizer as w };
|
|
372
|
+
export type { AuthStrategy as A, Compressor as C, DirEntry as D, FileHandle as F, HashService as H, InflateStreamResult as I, Logger as L, ProgressReporter as P, AuthorIdentity as a, Context as b, CreateContextParts as c, FileStat as e, FileSystem as f, Hasher as g, RepositoryConfig as h, RepositoryLayout as i };
|