@scolladon/tsgit 1.0.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-mZQKkInJ.js → browser-http-transport-COFgnEyq.js} +2 -2
- package/dist/esm/chunks/{browser-http-transport-mZQKkInJ.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-84ixEPbQ.js → logger-BLZbLzva.js} +2 -2
- package/dist/esm/chunks/{logger-84ixEPbQ.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-OTDhgmPO.js → progress-DJU_f66N.js} +2 -2
- package/dist/esm/chunks/{progress-OTDhgmPO.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 +1 -1
- package/dist/types/adapters/browser/index.d.ts +1 -1
- package/dist/types/adapters/memory/index.d.cts +3 -1
- package/dist/types/adapters/memory/index.d.ts +3 -1
- package/dist/types/adapters/node/index.d.cts +116 -2
- package/dist/types/adapters/node/index.d.ts +116 -2
- package/dist/types/chunks/{context-d36639-i.d.cts → context-D84z1i5F.d.cts} +36 -18
- package/dist/types/chunks/{context-CTaXSPiP.d.ts → context-o5TPfMB2.d.ts} +36 -18
- package/dist/types/chunks/{diff-change-B09vxnxy.d.cts → diff-change-Bm1zvVsC.d.cts} +1 -1
- package/dist/types/chunks/{diff-change-D7xSeCn9.d.ts → diff-change-alGRzD_j.d.ts} +1 -1
- package/dist/types/chunks/{repository-CFT9j9H6.d.cts → repository-23evW2h-.d.cts} +4 -3
- package/dist/types/chunks/{repository-ntg7eXb2.d.ts → repository-BT7Xq1kJ.d.ts} +4 -3
- 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 +81 -35
- package/dist/types/commands/index.d.ts +81 -35
- package/dist/types/index.browser.d.cts +4 -4
- package/dist/types/index.browser.d.ts +4 -4
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.default.d.cts +4 -4
- package/dist/types/index.default.d.ts +4 -4
- package/dist/types/index.node.d.cts +4 -4
- package/dist/types/index.node.d.ts +4 -4
- 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/package.json +37 -9
- 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-Cfo6Bj8T.cjs +0 -2
- package/dist/cjs/chunks/repository-Cfo6Bj8T.cjs.map +0 -1
- package/dist/esm/chunks/error-CnIcr6IG.js +0 -2
- package/dist/esm/chunks/error-CnIcr6IG.js.map +0 -1
- package/dist/esm/chunks/error-DTEP18A3.js +0 -2
- package/dist/esm/chunks/error-DTEP18A3.js.map +0 -1
- package/dist/esm/chunks/index-CJc-SKMj.js +0 -2
- package/dist/esm/chunks/index-CJc-SKMj.js.map +0 -1
- package/dist/esm/chunks/memory-http-transport-BmHjaEWj.js +0 -2
- package/dist/esm/chunks/memory-http-transport-BmHjaEWj.js.map +0 -1
- package/dist/esm/chunks/merge-base-DmuOYxfP.js +0 -2
- package/dist/esm/chunks/merge-base-DmuOYxfP.js.map +0 -1
- package/dist/esm/chunks/node-http-transport-Bz3noIS3.js +0 -2
- package/dist/esm/chunks/node-http-transport-Bz3noIS3.js.map +0 -1
- package/dist/esm/chunks/repository-qcX3-LkP.js +0 -2
- package/dist/esm/chunks/repository-qcX3-LkP.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as FilePath, b as Context, R as RefName, O as ObjectId } from '../chunks/context-
|
|
2
|
-
import { A as AuthorIdentity, T as TreeDiff } from '../chunks/diff-change-
|
|
1
|
+
import { d as FilePath, b as Context, R as RefName, O as ObjectId } from '../chunks/context-o5TPfMB2.js';
|
|
2
|
+
import { A as AuthorIdentity, T as TreeDiff } from '../chunks/diff-change-alGRzD_j.js';
|
|
3
3
|
import '../chunks/http-transport-DirKfK2S.js';
|
|
4
4
|
|
|
5
5
|
interface AddOptions {
|
|
@@ -13,14 +13,17 @@ interface AddResult {
|
|
|
13
13
|
readonly removed: ReadonlyArray<FilePath>;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* 1. Repo + bare + pending-op preflight checks.
|
|
18
|
-
* 2. Path validation for every input (no I/O on rejection).
|
|
19
|
-
* 3. Read working-tree contents → write blob → produce IndexEntry.
|
|
20
|
-
* 4. Atomically replace `.git/index` under the index lock.
|
|
16
|
+
* Stage paths in the index. Two modes:
|
|
21
17
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
* - **Literal-path mode** (`paths` non-empty, `all` falsy): every path is
|
|
19
|
+
* validated, read, hashed, and staged. Missing paths reject the whole call.
|
|
20
|
+
* - **Bulk mode** (`paths` empty, `all === true`): walk the working tree,
|
|
21
|
+
* stage every modified/new tracked file plus every untracked, non-ignored
|
|
22
|
+
* file. Files missing from disk but present in the prior index land in
|
|
23
|
+
* `removed`. `.git` and embedded repositories are skipped.
|
|
24
|
+
*
|
|
25
|
+
* Both modes acquire `.git/index.lock` once, read the existing index under
|
|
26
|
+
* the lock, and commit a single replacement — no partial writes.
|
|
24
27
|
*/
|
|
25
28
|
declare const add: (ctx: Context, paths: ReadonlyArray<string>, opts?: AddOptions) => Promise<AddResult>;
|
|
26
29
|
|
|
@@ -63,15 +66,21 @@ type BranchResult = {
|
|
|
63
66
|
};
|
|
64
67
|
declare const branch: (ctx: Context, action: BranchAction) => Promise<BranchResult>;
|
|
65
68
|
|
|
66
|
-
interface
|
|
69
|
+
interface CheckoutSwitchOptions {
|
|
67
70
|
readonly target: string;
|
|
68
71
|
readonly detach?: boolean;
|
|
69
72
|
readonly force?: boolean;
|
|
70
73
|
}
|
|
74
|
+
interface CheckoutPathsOptions {
|
|
75
|
+
readonly paths: ReadonlyArray<string>;
|
|
76
|
+
readonly source?: 'index' | 'HEAD' | ObjectId;
|
|
77
|
+
}
|
|
78
|
+
type CheckoutOptions = CheckoutSwitchOptions | CheckoutPathsOptions;
|
|
71
79
|
interface CheckoutResult {
|
|
72
80
|
readonly branch: RefName | undefined;
|
|
73
81
|
readonly id: ObjectId;
|
|
74
82
|
readonly detached: boolean;
|
|
83
|
+
readonly changedPaths: number;
|
|
75
84
|
}
|
|
76
85
|
declare const checkout: (ctx: Context, opts: CheckoutOptions) => Promise<CheckoutResult>;
|
|
77
86
|
|
|
@@ -82,6 +91,10 @@ interface CloneOptions {
|
|
|
82
91
|
readonly url: string;
|
|
83
92
|
readonly bare?: boolean;
|
|
84
93
|
readonly initialBranch?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Shallow clone depth. When set, sends `deepen N` and persists the
|
|
96
|
+
* resulting shallow boundaries to `.git/shallow`.
|
|
97
|
+
*/
|
|
85
98
|
readonly depth?: number;
|
|
86
99
|
/** DNS resolver injected by the caller; required to enforce SSRF guards. */
|
|
87
100
|
readonly resolver?: DnsResolver;
|
|
@@ -122,6 +135,8 @@ interface CommitResult {
|
|
|
122
135
|
*/
|
|
123
136
|
declare const commit: (ctx: Context, opts: CommitOptions) => Promise<CommitResult>;
|
|
124
137
|
|
|
138
|
+
type ConflictType = 'content' | 'add-add' | 'modify-delete' | 'type-change' | 'rename-rename' | 'gitlink' | 'binary';
|
|
139
|
+
|
|
125
140
|
interface DiffOptions {
|
|
126
141
|
/** Resolve to a tree. Accepts ref name, oid, or 'HEAD'. */
|
|
127
142
|
readonly from?: string;
|
|
@@ -139,15 +154,24 @@ interface FetchOptions {
|
|
|
139
154
|
readonly remote?: string;
|
|
140
155
|
readonly refspecs?: ReadonlyArray<string>;
|
|
141
156
|
readonly prune?: boolean;
|
|
157
|
+
/** Shallow clone depth. Delegates to fetchPack's deepen path. */
|
|
158
|
+
readonly depth?: number;
|
|
159
|
+
}
|
|
160
|
+
interface FetchUpdate {
|
|
161
|
+
readonly name: RefName;
|
|
162
|
+
readonly oldId: ObjectId | undefined;
|
|
163
|
+
readonly newId: ObjectId;
|
|
142
164
|
}
|
|
143
165
|
interface FetchResult {
|
|
144
166
|
readonly remote: string;
|
|
145
167
|
readonly url: string;
|
|
146
|
-
readonly updatedRefs: ReadonlyArray<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
168
|
+
readonly updatedRefs: ReadonlyArray<FetchUpdate>;
|
|
169
|
+
/** Refs deleted because the server no longer advertises them (prune semantics). */
|
|
170
|
+
readonly prunedRefs: ReadonlyArray<RefName>;
|
|
171
|
+
/** New shallow boundaries written to `.git/shallow` during this fetch. */
|
|
172
|
+
readonly shallow: ReadonlyArray<ObjectId>;
|
|
173
|
+
/** Commits that crossed the shallow → non-shallow boundary during this fetch. */
|
|
174
|
+
readonly unshallow: ReadonlyArray<ObjectId>;
|
|
151
175
|
}
|
|
152
176
|
declare const fetch: (ctx: Context, opts?: FetchOptions) => Promise<FetchResult>;
|
|
153
177
|
|
|
@@ -167,7 +191,7 @@ interface InitResult {
|
|
|
167
191
|
*
|
|
168
192
|
* For non-bare repos, the gitDir is `<workDir>/.git`. For bare, gitDir IS the
|
|
169
193
|
* working dir — callers must construct a Context with `bare: true` for that
|
|
170
|
-
* shape
|
|
194
|
+
* shape.
|
|
171
195
|
*/
|
|
172
196
|
declare const init: (ctx: Context, opts?: InitOptions) => Promise<InitResult>;
|
|
173
197
|
|
|
@@ -200,6 +224,10 @@ interface MergeOptions {
|
|
|
200
224
|
readonly author?: AuthorIdentity;
|
|
201
225
|
readonly committer?: AuthorIdentity;
|
|
202
226
|
}
|
|
227
|
+
interface MergeConflictDescriptor {
|
|
228
|
+
readonly path: FilePath;
|
|
229
|
+
readonly type: ConflictType;
|
|
230
|
+
}
|
|
203
231
|
type MergeResult = {
|
|
204
232
|
readonly kind: 'up-to-date';
|
|
205
233
|
readonly id: ObjectId;
|
|
@@ -212,14 +240,24 @@ type MergeResult = {
|
|
|
212
240
|
readonly id: ObjectId;
|
|
213
241
|
readonly branch: RefName;
|
|
214
242
|
readonly parents: ReadonlyArray<ObjectId>;
|
|
243
|
+
} | {
|
|
244
|
+
readonly kind: 'conflict';
|
|
245
|
+
readonly conflicts: ReadonlyArray<MergeConflictDescriptor>;
|
|
246
|
+
readonly mergeHead: ObjectId;
|
|
247
|
+
readonly origHead: ObjectId;
|
|
215
248
|
};
|
|
216
249
|
/**
|
|
217
|
-
* Merge `target` into the current HEAD branch.
|
|
218
|
-
*
|
|
219
|
-
* -
|
|
220
|
-
* -
|
|
221
|
-
*
|
|
222
|
-
*
|
|
250
|
+
* Merge `target` into the current HEAD branch.
|
|
251
|
+
*
|
|
252
|
+
* - Up-to-date: target is ancestor of HEAD → no-op.
|
|
253
|
+
* - Fast-forward: HEAD is ancestor of target → branch advances.
|
|
254
|
+
* - True merge for diverged histories:.4a wired the three-way
|
|
255
|
+
* tree merge (`mergeTrees` + `mergeContent`) so a CLEAN merge commits
|
|
256
|
+
* the merged tree directly.4b persists conflict state on
|
|
257
|
+
* disk (marker files, stage-1/2/3 index entries, MERGE_HEAD /
|
|
258
|
+
* MERGE_MSG / ORIG_HEAD) and returns `{ kind: 'conflict',... }`.
|
|
259
|
+
* Resolution path: edit the marker files, `repo.add(paths)`,
|
|
260
|
+
* `repo.commit({ message })` — the resulting commit has two parents.
|
|
223
261
|
*/
|
|
224
262
|
declare const merge: (ctx: Context, opts: MergeOptions) => Promise<MergeResult>;
|
|
225
263
|
|
|
@@ -229,14 +267,17 @@ interface PushOptions {
|
|
|
229
267
|
readonly force?: boolean;
|
|
230
268
|
readonly forceWithLease?: ObjectId | 'auto';
|
|
231
269
|
}
|
|
270
|
+
interface PushedRef {
|
|
271
|
+
readonly name: RefName;
|
|
272
|
+
readonly oldId: ObjectId;
|
|
273
|
+
readonly newId: ObjectId;
|
|
274
|
+
readonly status: 'ok' | 'rejected';
|
|
275
|
+
readonly reason?: string;
|
|
276
|
+
}
|
|
232
277
|
interface PushResult {
|
|
233
278
|
readonly remote: string;
|
|
234
279
|
readonly url: string;
|
|
235
|
-
readonly pushedRefs: ReadonlyArray<
|
|
236
|
-
readonly name: RefName;
|
|
237
|
-
readonly newId: ObjectId;
|
|
238
|
-
readonly status: 'ok' | 'rejected';
|
|
239
|
-
}>;
|
|
280
|
+
readonly pushedRefs: ReadonlyArray<PushedRef>;
|
|
240
281
|
}
|
|
241
282
|
declare const push: (ctx: Context, opts?: PushOptions) => Promise<PushResult>;
|
|
242
283
|
|
|
@@ -253,13 +294,18 @@ interface ResetResult {
|
|
|
253
294
|
/**
|
|
254
295
|
* Reset HEAD (and optionally index/working tree) to `target`.
|
|
255
296
|
*
|
|
256
|
-
* - `soft`:
|
|
257
|
-
* - `mixed`: HEAD +
|
|
258
|
-
*
|
|
297
|
+
* - `soft`: HEAD only.
|
|
298
|
+
* - `mixed`: HEAD + rebuild the index from the target commit's tree
|
|
299
|
+
* (stat-cache donor strategy preserves cache for unchanged paths —
|
|
300
|
+
* ). Working tree is NOT touched.
|
|
301
|
+
* - `hard`: HEAD + index + working tree — materialise the target tree onto
|
|
302
|
+
* the working tree with `force: true`, then commit the post-write
|
|
303
|
+
* index entries. Bare repos are rejected upfront.
|
|
259
304
|
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
305
|
+
* Ordering: working tree → index → HEAD. The index lock wraps both the
|
|
306
|
+
* working-tree write AND the index commit, matching tightened
|
|
307
|
+
* pattern. A crash between the index commit and HEAD update leaves the index
|
|
308
|
+
* ahead of HEAD — same recoverable hazard as canonical git.
|
|
263
309
|
*/
|
|
264
310
|
declare const reset: (ctx: Context, opts: ResetOptions) => Promise<ResetResult>;
|
|
265
311
|
|
|
@@ -293,10 +339,10 @@ interface StatusResult {
|
|
|
293
339
|
/**
|
|
294
340
|
* Summarize the state of the working tree relative to the index, and the
|
|
295
341
|
* branch HEAD points at. Working-tree-vs-HEAD diff (Git's "staged" column)
|
|
296
|
-
* is approximated via index-vs-working-tree comparisons until
|
|
342
|
+
* is approximated via index-vs-working-tree comparisons until
|
|
297
343
|
* adds the stat-cache fast path.
|
|
298
344
|
*
|
|
299
|
-
* Progress reporting
|
|
345
|
+
* Progress reporting: emits `status:scan` start before the
|
|
300
346
|
* fan-out, updates at every 100 lstat completions, and end in a finally
|
|
301
347
|
* block so the consumer always pairs start with end. `total` is undefined
|
|
302
348
|
* — design choice that prevents revealing repository size to non-trusted
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-
|
|
1
|
+
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-23evW2h-.cjs';
|
|
2
2
|
export { AdapterSet, consoleProgress, detectRuntime, isBrowser, isNode, noopProgress } from './index.cjs';
|
|
3
|
-
export { P as ProgressReporter } from './chunks/context-
|
|
3
|
+
export { P as ProgressReporter } from './chunks/context-D84z1i5F.cjs';
|
|
4
4
|
import './commands/index.cjs';
|
|
5
|
-
import './chunks/diff-change-
|
|
6
|
-
import './
|
|
5
|
+
import './chunks/diff-change-Bm1zvVsC.cjs';
|
|
6
|
+
import './chunks/write-tree-DVp0RJ_r.cjs';
|
|
7
7
|
import './chunks/http-transport-DirKfK2S.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-
|
|
1
|
+
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-BT7Xq1kJ.js';
|
|
2
2
|
export { AdapterSet, consoleProgress, detectRuntime, isBrowser, isNode, noopProgress } from './index.js';
|
|
3
|
-
export { P as ProgressReporter } from './chunks/context-
|
|
3
|
+
export { P as ProgressReporter } from './chunks/context-o5TPfMB2.js';
|
|
4
4
|
import './commands/index.js';
|
|
5
|
-
import './chunks/diff-change-
|
|
6
|
-
import './
|
|
5
|
+
import './chunks/diff-change-alGRzD_j.js';
|
|
6
|
+
import './chunks/write-tree-DNjhjS3t.js';
|
|
7
7
|
import './chunks/http-transport-DirKfK2S.js';
|
|
8
8
|
|
|
9
9
|
/**
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as FileSystem, H as HashService, C as Compressor, P as ProgressReporter } from './chunks/context-
|
|
2
|
-
export { A as AuthStrategy, a as AuthorIdentity, b as Context, c as CreateContextParts, D as DirEntry, e as FileStat, g as Hasher, L as Logger, h as RepositoryConfig, i as RepositoryLayout, j as createContext, n as noopLogger, w as wrapLoggerSanitizer } from './chunks/context-
|
|
1
|
+
import { f as FileSystem, H as HashService, C as Compressor, P as ProgressReporter } from './chunks/context-D84z1i5F.cjs';
|
|
2
|
+
export { A as AuthStrategy, a as AuthorIdentity, b as Context, c as CreateContextParts, D as DirEntry, e as FileStat, g as Hasher, L as Logger, h as RepositoryConfig, i as RepositoryLayout, j as createContext, n as noopLogger, w as wrapLoggerSanitizer } from './chunks/context-D84z1i5F.cjs';
|
|
3
3
|
import { b as HttpTransport } from './chunks/http-transport-DirKfK2S.cjs';
|
|
4
4
|
export { H as HttpRequest, a as HttpResponse } from './chunks/http-transport-DirKfK2S.cjs';
|
|
5
5
|
export { AddOptions, AddResult, BranchAction, BranchInfo, BranchResult, ChangeEntry, ChangeKind, CheckoutOptions, CheckoutResult, CloneOptions, CloneResult, CommitOptions, CommitResult, DiffOptions, FetchOptions, FetchResult, InitOptions, InitResult, LogEntry, LogOptions, MergeOptions, MergeResult, PushOptions, PushResult, ResetMode, ResetOptions, ResetResult, RmOptions, RmResult, StatusResult, TagAction, TagInfo, TagResult, add, branch, checkout, clone, commit, diff, fetch, init, log, merge, push, reset, revParse, rm, status, tag } from './commands/index.cjs';
|
|
6
|
-
import './chunks/diff-change-
|
|
6
|
+
import './chunks/diff-change-Bm1zvVsC.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The four adapter ports the facade plumbs into the Context. Each runtime
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as FileSystem, H as HashService, C as Compressor, P as ProgressReporter } from './chunks/context-
|
|
2
|
-
export { A as AuthStrategy, a as AuthorIdentity, b as Context, c as CreateContextParts, D as DirEntry, e as FileStat, g as Hasher, L as Logger, h as RepositoryConfig, i as RepositoryLayout, j as createContext, n as noopLogger, w as wrapLoggerSanitizer } from './chunks/context-
|
|
1
|
+
import { f as FileSystem, H as HashService, C as Compressor, P as ProgressReporter } from './chunks/context-o5TPfMB2.js';
|
|
2
|
+
export { A as AuthStrategy, a as AuthorIdentity, b as Context, c as CreateContextParts, D as DirEntry, e as FileStat, g as Hasher, L as Logger, h as RepositoryConfig, i as RepositoryLayout, j as createContext, n as noopLogger, w as wrapLoggerSanitizer } from './chunks/context-o5TPfMB2.js';
|
|
3
3
|
import { b as HttpTransport } from './chunks/http-transport-DirKfK2S.js';
|
|
4
4
|
export { H as HttpRequest, a as HttpResponse } from './chunks/http-transport-DirKfK2S.js';
|
|
5
5
|
export { AddOptions, AddResult, BranchAction, BranchInfo, BranchResult, ChangeEntry, ChangeKind, CheckoutOptions, CheckoutResult, CloneOptions, CloneResult, CommitOptions, CommitResult, DiffOptions, FetchOptions, FetchResult, InitOptions, InitResult, LogEntry, LogOptions, MergeOptions, MergeResult, PushOptions, PushResult, ResetMode, ResetOptions, ResetResult, RmOptions, RmResult, StatusResult, TagAction, TagInfo, TagResult, add, branch, checkout, clone, commit, diff, fetch, init, log, merge, push, reset, revParse, rm, status, tag } from './commands/index.js';
|
|
6
|
-
import './chunks/diff-change-
|
|
6
|
+
import './chunks/diff-change-alGRzD_j.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The four adapter ports the facade plumbs into the Context. Each runtime
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-
|
|
1
|
+
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-23evW2h-.cjs';
|
|
2
2
|
export { AdapterSet, consoleProgress, detectRuntime, isBrowser, isNode, noopProgress } from './index.cjs';
|
|
3
|
-
export { P as ProgressReporter } from './chunks/context-
|
|
3
|
+
export { P as ProgressReporter } from './chunks/context-D84z1i5F.cjs';
|
|
4
4
|
import './commands/index.cjs';
|
|
5
|
-
import './chunks/diff-change-
|
|
6
|
-
import './
|
|
5
|
+
import './chunks/diff-change-Bm1zvVsC.cjs';
|
|
6
|
+
import './chunks/write-tree-DVp0RJ_r.cjs';
|
|
7
7
|
import './chunks/http-transport-DirKfK2S.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-
|
|
1
|
+
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-BT7Xq1kJ.js';
|
|
2
2
|
export { AdapterSet, consoleProgress, detectRuntime, isBrowser, isNode, noopProgress } from './index.js';
|
|
3
|
-
export { P as ProgressReporter } from './chunks/context-
|
|
3
|
+
export { P as ProgressReporter } from './chunks/context-o5TPfMB2.js';
|
|
4
4
|
import './commands/index.js';
|
|
5
|
-
import './chunks/diff-change-
|
|
6
|
-
import './
|
|
5
|
+
import './chunks/diff-change-alGRzD_j.js';
|
|
6
|
+
import './chunks/write-tree-DNjhjS3t.js';
|
|
7
7
|
import './chunks/http-transport-DirKfK2S.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-
|
|
1
|
+
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-23evW2h-.cjs';
|
|
2
2
|
export { AdapterSet, consoleProgress, detectRuntime, isBrowser, isNode, noopProgress } from './index.cjs';
|
|
3
|
-
export { P as ProgressReporter } from './chunks/context-
|
|
3
|
+
export { P as ProgressReporter } from './chunks/context-D84z1i5F.cjs';
|
|
4
4
|
import './commands/index.cjs';
|
|
5
|
-
import './chunks/diff-change-
|
|
6
|
-
import './
|
|
5
|
+
import './chunks/diff-change-Bm1zvVsC.cjs';
|
|
6
|
+
import './chunks/write-tree-DVp0RJ_r.cjs';
|
|
7
7
|
import './chunks/http-transport-DirKfK2S.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-
|
|
1
|
+
import { O as OpenRepositoryOptions, R as Repository } from './chunks/repository-BT7Xq1kJ.js';
|
|
2
2
|
export { AdapterSet, consoleProgress, detectRuntime, isBrowser, isNode, noopProgress } from './index.js';
|
|
3
|
-
export { P as ProgressReporter } from './chunks/context-
|
|
3
|
+
export { P as ProgressReporter } from './chunks/context-o5TPfMB2.js';
|
|
4
4
|
import './commands/index.js';
|
|
5
|
-
import './chunks/diff-change-
|
|
6
|
-
import './
|
|
5
|
+
import './chunks/diff-change-alGRzD_j.js';
|
|
6
|
+
import './chunks/write-tree-DNjhjS3t.js';
|
|
7
7
|
import './chunks/http-transport-DirKfK2S.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -28,9 +28,25 @@ declare function pipe<A, B, C, D, E, F, G, H>(a: A, ab: UnaryFn<A, B>, bc: Unary
|
|
|
28
28
|
declare function pipe<A, B, C, D, E, F, G, H, I>(a: A, ab: UnaryFn<A, B>, bc: UnaryFn<B, C>, cd: UnaryFn<C, D>, de: UnaryFn<D, E>, ef: UnaryFn<E, F>, fg: UnaryFn<F, G>, gh: UnaryFn<G, H>, hi: UnaryFn<H, I>): I;
|
|
29
29
|
declare function pipe<A, B, C, D, E, F, G, H, I, J>(a: A, ab: UnaryFn<A, B>, bc: UnaryFn<B, C>, cd: UnaryFn<C, D>, de: UnaryFn<D, E>, ef: UnaryFn<E, F>, fg: UnaryFn<F, G>, gh: UnaryFn<G, H>, hi: UnaryFn<H, I>, ij: UnaryFn<I, J>): J;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Adapt a Web `ReadableStream<Uint8Array>` (the type `fetch` returns on
|
|
33
|
+
* `Response.body`) to an `AsyncIterable<Uint8Array>` that the pkt-line
|
|
34
|
+
* decoder and other AsyncIterable consumers can drive.
|
|
35
|
+
*
|
|
36
|
+
* Why this lives in `src/operators/`: both the `fetch-pack` primitive and
|
|
37
|
+
* the `commands/internal/upload-pack-client` helper need it, and a primitive
|
|
38
|
+
* cannot import from `commands/`. The operators module is the natural home —
|
|
39
|
+
* it owns AsyncIterable composition helpers with zero domain dependencies.
|
|
40
|
+
*
|
|
41
|
+
* Lifecycle: on early exit (consumer throws or breaks) the iterator's
|
|
42
|
+
* `return` hook calls `cancel()` so the stream + underlying socket close
|
|
43
|
+
* cleanly. `releaseLock` alone leaves the stream open.
|
|
44
|
+
*/
|
|
45
|
+
declare const readableStreamToAsyncIterable: (stream: ReadableStream<Uint8Array>) => AsyncIterable<Uint8Array>;
|
|
46
|
+
|
|
31
47
|
declare function take<T>(count: number): (source: AsyncIterable<T>) => AsyncIterable<T>;
|
|
32
48
|
|
|
33
49
|
declare function toArray<T>(source: AsyncIterable<T>, limit?: number): Promise<T[]>;
|
|
34
50
|
|
|
35
|
-
export { filter, find, flatMap, groupBy, map, pipe, take, toArray };
|
|
51
|
+
export { filter, find, flatMap, groupBy, map, pipe, readableStreamToAsyncIterable, take, toArray };
|
|
36
52
|
export type { Awaitable };
|
|
@@ -28,9 +28,25 @@ declare function pipe<A, B, C, D, E, F, G, H>(a: A, ab: UnaryFn<A, B>, bc: Unary
|
|
|
28
28
|
declare function pipe<A, B, C, D, E, F, G, H, I>(a: A, ab: UnaryFn<A, B>, bc: UnaryFn<B, C>, cd: UnaryFn<C, D>, de: UnaryFn<D, E>, ef: UnaryFn<E, F>, fg: UnaryFn<F, G>, gh: UnaryFn<G, H>, hi: UnaryFn<H, I>): I;
|
|
29
29
|
declare function pipe<A, B, C, D, E, F, G, H, I, J>(a: A, ab: UnaryFn<A, B>, bc: UnaryFn<B, C>, cd: UnaryFn<C, D>, de: UnaryFn<D, E>, ef: UnaryFn<E, F>, fg: UnaryFn<F, G>, gh: UnaryFn<G, H>, hi: UnaryFn<H, I>, ij: UnaryFn<I, J>): J;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Adapt a Web `ReadableStream<Uint8Array>` (the type `fetch` returns on
|
|
33
|
+
* `Response.body`) to an `AsyncIterable<Uint8Array>` that the pkt-line
|
|
34
|
+
* decoder and other AsyncIterable consumers can drive.
|
|
35
|
+
*
|
|
36
|
+
* Why this lives in `src/operators/`: both the `fetch-pack` primitive and
|
|
37
|
+
* the `commands/internal/upload-pack-client` helper need it, and a primitive
|
|
38
|
+
* cannot import from `commands/`. The operators module is the natural home —
|
|
39
|
+
* it owns AsyncIterable composition helpers with zero domain dependencies.
|
|
40
|
+
*
|
|
41
|
+
* Lifecycle: on early exit (consumer throws or breaks) the iterator's
|
|
42
|
+
* `return` hook calls `cancel()` so the stream + underlying socket close
|
|
43
|
+
* cleanly. `releaseLock` alone leaves the stream open.
|
|
44
|
+
*/
|
|
45
|
+
declare const readableStreamToAsyncIterable: (stream: ReadableStream<Uint8Array>) => AsyncIterable<Uint8Array>;
|
|
46
|
+
|
|
31
47
|
declare function take<T>(count: number): (source: AsyncIterable<T>) => AsyncIterable<T>;
|
|
32
48
|
|
|
33
49
|
declare function toArray<T>(source: AsyncIterable<T>, limit?: number): Promise<T[]>;
|
|
34
50
|
|
|
35
|
-
export { filter, find, flatMap, groupBy, map, pipe, take, toArray };
|
|
51
|
+
export { filter, find, flatMap, groupBy, map, pipe, readableStreamToAsyncIterable, take, toArray };
|
|
36
52
|
export type { Awaitable };
|