@osdlc/typed-git 0.5.0 → 0.5.3

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/async.js CHANGED
@@ -18,15 +18,18 @@ import { cliBackend } from "./backend.js";
18
18
  import { softAsync, triedAsync } from "./outcome.js";
19
19
  import { parseRemoteUrl } from "./remote-url.js";
20
20
  import { SOFT_TABLE } from "./soft.js";
21
- import { parseRefRows, splitLines, } from "./verbs.js";
21
+ import { parseRefRows, splitLines, splitTrailingOptions, } from "./verbs.js";
22
22
  /**
23
23
  * Split a merged option bag into the per-call concerns and the operation's
24
24
  * own fields. A {@link GitRequest} must stay serializable data, so `signal`
25
25
  * and `timeoutMs` are separated out before the request is built.
26
26
  */
27
27
  function splitCallOptions(opts) {
28
- const { timeoutMs, signal, env, ...rest } = opts;
29
- return [{ timeoutMs, signal, env }, rest];
28
+ const { timeoutMs, signal, env, maxOutputBytes, ...rest } = opts;
29
+ return [
30
+ { timeoutMs, signal, env, maxOutputBytes },
31
+ rest,
32
+ ];
30
33
  }
31
34
  /** A typed, awaitable git client bound to one working directory. */
32
35
  export class AsyncGit {
@@ -87,8 +90,8 @@ export class AsyncGit {
87
90
  }
88
91
  /**
89
92
  * Checked argv passthrough — rejects with `CommandFailed` on a non-zero
90
- * exit. Report `e.detail`, which joins both streams; see
91
- * {@link Git.rawChecked}.
93
+ * exit, and on output cut short at the output cap or a timeout. Report
94
+ * `e.detail`, which joins both streams; see {@link Git.rawChecked}.
92
95
  */
93
96
  rawChecked(argv, opts = {}) {
94
97
  return this.backend.execute(this.cwd, { kind: 'raw', argv, checked: true, input: opts.input }, opts);
@@ -98,9 +101,13 @@ export class AsyncGit {
98
101
  showAtRev(rev, relPath, opts = {}) {
99
102
  return this.backend.execute(this.cwd, { kind: 'showAtRev', rev, relPath }, opts);
100
103
  }
101
- /** See {@link Git.revParse}. For a ref, prefer {@link AsyncGit.resolveRef}. */
104
+ /**
105
+ * See {@link Git.revParse}. Call options go last, as an object. For a ref,
106
+ * prefer {@link AsyncGit.resolveRef}.
107
+ */
102
108
  revParse(...args) {
103
- return this.backend.execute(this.cwd, { kind: 'revParse', args });
109
+ const [argv, opts] = splitTrailingOptions(args);
110
+ return this.backend.execute(this.cwd, { kind: 'revParse', args: argv }, opts);
104
111
  }
105
112
  /** The sha `ref` resolves to, or null. See {@link Git.resolveRef}. */
106
113
  resolveRef(ref, opts = {}) {
@@ -125,6 +132,13 @@ export class AsyncGit {
125
132
  gitCommonDir(opts = {}) {
126
133
  return this.backend.execute(this.cwd, { kind: 'gitCommonDir' }, opts);
127
134
  }
135
+ /**
136
+ * This worktree's own `.git` dir as an absolute path, or null outside a
137
+ * repo. See {@link Git.gitDir}.
138
+ */
139
+ gitDir(opts = {}) {
140
+ return this.backend.execute(this.cwd, { kind: 'gitDir' }, opts);
141
+ }
128
142
  /**
129
143
  * What a symbolic ref points at (full refname), or null when it is not one.
130
144
  * See {@link Git.symbolicRef}.
@@ -180,9 +194,20 @@ export class AsyncGit {
180
194
  logSubject(ref, opts = {}) {
181
195
  return this.backend.execute(this.cwd, { kind: 'logSubject', ref }, opts);
182
196
  }
183
- /** `git config --get <key>`, or null when unset. */
197
+ /** `git config --get <key>`, or null when unset. `scope` reads one file only. */
184
198
  configGet(key, opts = {}) {
185
- return this.backend.execute(this.cwd, { kind: 'configGet', key }, opts);
199
+ const [call, req] = splitCallOptions(opts);
200
+ return this.backend.execute(this.cwd, { kind: 'configGet', key, ...req }, call);
201
+ }
202
+ /** Every value of a multi-valued key, verbatim; `[]` when unset. */
203
+ configGetAll(key, opts = {}) {
204
+ const [call, req] = splitCallOptions(opts);
205
+ return this.backend.execute(this.cwd, { kind: 'configGetAll', key, ...req }, call);
206
+ }
207
+ /** A key read as a boolean by git, or null when unset. See {@link Git.configGetBool}. */
208
+ configGetBool(key, opts = {}) {
209
+ const [call, req] = splitCallOptions(opts);
210
+ return this.backend.execute(this.cwd, { kind: 'configGetBool', key, ...req }, call);
186
211
  }
187
212
  /** True iff `rev` resolves to an object. */
188
213
  objectExists(rev, opts = {}) {
@@ -226,18 +251,20 @@ export class AsyncGit {
226
251
  lsFilesTagged(opts = {}) {
227
252
  return this.backend.execute(this.cwd, { kind: 'lsFilesTagged' }, opts);
228
253
  }
229
- /** The unified diff itself; empty string on failure. */
254
+ /**
255
+ * The unified diff; `""` when nothing differs. A bad rev, or a cwd outside a
256
+ * repository, rejects. See {@link Git.diffText}.
257
+ */
230
258
  diffText(rev, opts = {}) {
231
- return this.backend.execute(this.cwd, {
232
- kind: 'diffText',
233
- rev,
234
- staged: opts.staged,
235
- paths: opts.paths,
236
- });
259
+ const [call, req] = splitCallOptions(opts);
260
+ return this.backend.execute(this.cwd, { kind: 'diffText', rev, staged: req.staged, paths: req.paths }, call);
237
261
  }
238
- /** One untracked file rendered as an all-added diff. */
239
- diffAddedFile(relPath) {
240
- return this.backend.execute(this.cwd, { kind: 'diffAddedFile', relPath });
262
+ /**
263
+ * One untracked file rendered as an all-added diff. A path git cannot read
264
+ * rejects. See {@link Git.diffAddedFile}.
265
+ */
266
+ diffAddedFile(relPath, opts = {}) {
267
+ return this.backend.execute(this.cwd, { kind: 'diffAddedFile', relPath }, opts);
241
268
  }
242
269
  /** `for-each-ref` rows, one line each, in the caller's format. */
243
270
  forEachRef(pattern, opts = {}) {
@@ -319,12 +346,37 @@ export class AsyncGit {
319
346
  return this.backend.execute(this.cwd, { kind: 'aheadBehind', base, tip }, opts);
320
347
  }
321
348
  /** Configured remote names (`git remote`); `[]` when there are none. */
322
- remote(opts = {}) {
349
+ remotes(opts = {}) {
323
350
  return this.backend.execute(this.cwd, { kind: 'remote' }, opts);
324
351
  }
325
- /** A remote's fetch URL, or null when no remote by that name exists. */
352
+ /**
353
+ * The same as {@link AsyncGit.remotes}.
354
+ *
355
+ * @deprecated Use `remotes()`. The name `remote()` reads as one remote, but
356
+ * it returns every remote name. It will be removed at 1.0.
357
+ */
358
+ remote(opts = {}) {
359
+ return this.remotes(opts);
360
+ }
361
+ /**
362
+ * A remote's fetch URL (push URL with `push`), or null when no remote by
363
+ * that name exists.
364
+ */
326
365
  remoteGetUrl(name, opts = {}) {
327
- return this.backend.execute(this.cwd, { kind: 'remoteGetUrl', name }, opts);
366
+ const [call, req] = splitCallOptions(opts);
367
+ return this.backend.execute(this.cwd, { kind: 'remoteGetUrl', name, ...req }, call);
368
+ }
369
+ /** Every URL a remote has (push URLs with `push`); `[]` for an unknown remote. */
370
+ remoteGetUrls(name, opts = {}) {
371
+ const [call, req] = splitCallOptions(opts);
372
+ return this.backend.execute(this.cwd, { kind: 'remoteGetUrls', name, ...req }, call);
373
+ }
374
+ /**
375
+ * The full refname the remote's HEAD points at, asked over the network; null
376
+ * when the remote names none. See {@link Git.remoteHead}.
377
+ */
378
+ remoteHead(remote, opts = {}) {
379
+ return this.backend.execute(this.cwd, { kind: 'remoteHead', remote }, opts);
328
380
  }
329
381
  /** The coordinate a remote's URL names, or null. See {@link Git.remoteOwnerRepo}. */
330
382
  async remoteOwnerRepo(remote = 'origin', opts = {}) {
@@ -367,11 +419,9 @@ export class AsyncGit {
367
419
  return this.backend.execute(this.cwd, { kind: 'clone', url, dest, ...req }, call);
368
420
  }
369
421
  /**
370
- * Push a refspec. `{forceWithLease: true}` adds a bare `--force-with-lease`;
371
- * a {@link ForceLease} pins it, which is the form that means "nobody has
372
- * touched this since I looked" — the bare one compares against the
373
- * remote-tracking ref, which a fetch in this same process may have just
374
- * updated.
422
+ * Push a refspec. A {@link ForceLease} pins `--force-with-lease`.
423
+ * `{forceWithLease: true}` adds the bare flag, which is the unsafe form. See
424
+ * {@link Git.push}.
375
425
  */
376
426
  push(remote, refspec, opts = {}) {
377
427
  return this.backend.execute(this.cwd, { kind: 'push', remote, refspec, forceWithLease: opts.forceWithLease }, opts);
@@ -389,7 +439,10 @@ export class AsyncGit {
389
439
  deleteBranch(name, opts = {}) {
390
440
  return this.backend.execute(this.cwd, { kind: 'deleteBranch', name, force: opts.force }, opts);
391
441
  }
392
- /** Remove config section `name`; false when it was absent. See {@link v.configRemoveSection}. */
442
+ /**
443
+ * Remove config section `name`; false when it was absent. See
444
+ * `configRemoveSection` in `verbs.ts`.
445
+ */
393
446
  configRemoveSection(name, opts = {}) {
394
447
  return this.backend.execute(this.cwd, { kind: 'configRemoveSection', name }, opts);
395
448
  }
@@ -464,8 +517,13 @@ export class AsyncGit {
464
517
  lsFilesUnmerged(opts = {}) {
465
518
  return this.backend.execute(this.cwd, { kind: 'lsFilesUnmerged' }, opts);
466
519
  }
467
- /** Resolve conflicted `paths` to one side wholesale. */
520
+ /**
521
+ * Resolve conflicted `paths` to one side wholesale. An empty list resolves
522
+ * without calling the backend. See {@link Git.checkoutSide}.
523
+ */
468
524
  checkoutSide(side, paths, opts = {}) {
525
+ if (paths.length === 0)
526
+ return Promise.resolve();
469
527
  return this.backend.execute(this.cwd, { kind: 'checkoutSide', side, paths }, opts);
470
528
  }
471
529
  /** `git checkout [-f] [-b|-B <branch>] <ref>`. */
package/dist/backend.d.ts CHANGED
@@ -11,9 +11,14 @@
11
11
  * It also means a request can be logged, queued, or replayed as data. The one
12
12
  * request that cannot cross that line is `raw`, which is argv by definition; a
13
13
  * non-CLI backend rejects it with {@link UnsupportedRequest}.
14
+ *
15
+ * The seam is experimental: `GitBackend`, `GitRequest`, `GitResults` and
16
+ * `partialBackend`. Each new verb adds a request kind, which breaks a backend
17
+ * written as an exhaustive switch. Such a change can land in a minor release.
18
+ * `cliBackend` and `AsyncGit` are stable.
14
19
  */
15
20
  import { type AsyncCommandRunner, type CommandResult } from '@osdlc/command-seam';
16
- import { type AddOptions, type AheadBehind, type CheckoutOptions, type CloneOptions, type CommitOptions, type ConfigSetOptions, type ConflictSide, type DiffEntry, type DiffNameOnlyOptions, type DiffStatOptions, type DiffNameStatusOptions, type DiffTreeOptions, type FetchOptions, type ForEachRefOptions, type ForceLease, type GrepOptions, type InitOptions, type LogOptions, type IgnoreMatch, type LsFilesOptions, type LsRemoteOptions, type LsTreeOptions, type MergeOptions, type MergeOutcome, type MergeTreeOptions, type MergeTreeOutcome, type NumstatEntry, type RebaseOptions, type RebaseOutcome, type RemoteRef, type CleanOptions, type DiffCheckOptions, type DiffCheckResult, type StatusEntry, type StatusPorcelainOptions, type TreeEntry, type TaggedFile, type UnmergedEntry, type Worktree, type WorktreeMoveOptions } from './verbs.ts';
21
+ import { type AddOptions, type AheadBehind, type CheckoutOptions, type CloneOptions, type CommitOptions, type ConfigGetOptions, type ConfigSetOptions, type ConflictSide, type DiffEntry, type DiffNameOnlyOptions, type DiffStatOptions, type DiffNameStatusOptions, type DiffTextOptions, type DiffTreeOptions, type FetchOptions, type ForEachRefOptions, type ForceLease, type GrepOptions, type InitOptions, type LogOptions, type IgnoreMatch, type LsFilesOptions, type LsRemoteOptions, type LsTreeOptions, type MergeOptions, type MergeOutcome, type MergeTreeOptions, type MergeTreeOutcome, type NumstatEntry, type RebaseOptions, type RebaseOutcome, type RemoteGetUrlOptions, type RemoteRef, type CleanOptions, type DiffCheckOptions, type DiffCheckResult, type StatusEntry, type StatusPorcelainOptions, type TreeEntry, type TaggedFile, type UnmergedEntry, type Worktree, type WorktreeMoveOptions } from './verbs.ts';
17
22
  /** Per-call concerns that are not part of the operation itself. */
18
23
  export interface GitCallOptions {
19
24
  /**
@@ -32,6 +37,14 @@ export interface GitCallOptions {
32
37
  * invocation runs, not what operation was asked for.
33
38
  */
34
39
  env?: Record<string, string> | undefined;
40
+ /**
41
+ * Cap on each output stream, in bytes. Past it the runner kills the child
42
+ * and the call throws (sync) or rejects (async) with `CommandFailed`, so
43
+ * cut-short output is never read as an answer. A backend that cannot
44
+ * enforce it may ignore it. Without it the async runner has no cap and the
45
+ * sync runner caps at 256 MB.
46
+ */
47
+ maxOutputBytes?: number | undefined;
35
48
  }
36
49
  /**
37
50
  * One git operation, described rather than invoked.
@@ -40,6 +53,8 @@ export interface GitCallOptions {
40
53
  * is normally built by spreading a caller's options, and under
41
54
  * `exactOptionalPropertyTypes` a present-but-undefined property is not the
42
55
  * same as an absent one. Both mean "not given" here.
56
+ *
57
+ * @experimental Each new verb adds a kind, in a minor release.
43
58
  */
44
59
  export type GitRequest = {
45
60
  kind: 'showAtRev';
@@ -57,6 +72,8 @@ export type GitRequest = {
57
72
  kind: 'topLevel';
58
73
  } | {
59
74
  kind: 'gitCommonDir';
75
+ } | {
76
+ kind: 'gitDir';
60
77
  } | {
61
78
  kind: 'symbolicRef';
62
79
  ref: string;
@@ -78,10 +95,16 @@ export type GitRequest = {
78
95
  } | {
79
96
  kind: 'logSubject';
80
97
  ref: string;
81
- } | {
98
+ } | ({
82
99
  kind: 'configGet';
83
100
  key: string;
84
- } | {
101
+ } & ConfigGetOptions) | ({
102
+ kind: 'configGetAll';
103
+ key: string;
104
+ } & ConfigGetOptions) | ({
105
+ kind: 'configGetBool';
106
+ key: string;
107
+ } & ConfigGetOptions) | {
85
108
  kind: 'objectExists';
86
109
  rev: string;
87
110
  } | ({
@@ -131,12 +154,10 @@ export type GitRequest = {
131
154
  } & DiffTreeOptions) | ({
132
155
  kind: 'grep';
133
156
  pattern: string;
134
- } & GrepOptions) | {
157
+ } & GrepOptions) | ({
135
158
  kind: 'diffText';
136
159
  rev?: string | undefined;
137
- staged?: boolean | undefined;
138
- paths?: string[] | undefined;
139
- } | {
160
+ } & DiffTextOptions) | {
140
161
  kind: 'diffAddedFile';
141
162
  relPath: string;
142
163
  } | ({
@@ -223,9 +244,15 @@ export type GitRequest = {
223
244
  ref: string;
224
245
  } & CheckoutOptions) | {
225
246
  kind: 'remote';
226
- } | {
247
+ } | ({
227
248
  kind: 'remoteGetUrl';
228
249
  name: string;
250
+ } & RemoteGetUrlOptions) | ({
251
+ kind: 'remoteGetUrls';
252
+ name: string;
253
+ } & RemoteGetUrlOptions) | {
254
+ kind: 'remoteHead';
255
+ remote: string;
229
256
  } | {
230
257
  kind: 'remoteAdd';
231
258
  name: string;
@@ -236,7 +263,11 @@ export type GitRequest = {
236
263
  input?: string | undefined;
237
264
  checked?: boolean | undefined;
238
265
  };
239
- /** The result type each request kind resolves to. */
266
+ /**
267
+ * The result type each request kind resolves to.
268
+ *
269
+ * @experimental It grows with {@link GitRequest}.
270
+ */
240
271
  export interface GitResults {
241
272
  showAtRev: string | null;
242
273
  revParse: string | null;
@@ -244,6 +275,7 @@ export interface GitResults {
244
275
  headRef: string | null;
245
276
  topLevel: string | null;
246
277
  gitCommonDir: string | null;
278
+ gitDir: string | null;
247
279
  symbolicRef: string | null;
248
280
  currentBranch: string | null;
249
281
  statusPorcelain: string[];
@@ -253,6 +285,8 @@ export interface GitResults {
253
285
  mergeBase: string | null;
254
286
  logSubject: string | null;
255
287
  configGet: string | null;
288
+ configGetAll: string[];
289
+ configGetBool: boolean | null;
256
290
  objectExists: boolean;
257
291
  lsRemote: RemoteRef[];
258
292
  checkIgnore: Set<string>;
@@ -300,6 +334,8 @@ export interface GitResults {
300
334
  checkout: void;
301
335
  remote: string[];
302
336
  remoteGetUrl: string | null;
337
+ remoteGetUrls: string[];
338
+ remoteHead: string | null;
303
339
  remoteAdd: void;
304
340
  raw: CommandResult;
305
341
  }
@@ -313,6 +349,9 @@ export type GitRequestKind = GitRequest['kind'];
313
349
  * `[]`, `false`) for a state the verb declares absent, such as an unset
314
350
  * config key. It rejects with `CommandFailed` — or whatever error the backend
315
351
  * considers equivalent — when git failed rather than answered.
352
+ *
353
+ * @experimental New request kinds land in minor releases. Use
354
+ * {@link partialBackend} rather than an exhaustive switch.
316
355
  */
317
356
  export interface GitBackend {
318
357
  execute<R extends GitRequest>(cwd: string, request: R, opts?: GitCallOptions): Promise<GitResults[R['kind']]>;
@@ -350,6 +389,8 @@ export declare function cliBackend(opts?: {
350
389
  * rejects with {@link UnsupportedRequest} instead of failing as `undefined`.
351
390
  * The way to ship a backend that covers the operations it can and says so
352
391
  * about the rest.
392
+ *
393
+ * @experimental Part of the backend seam; see {@link GitBackend}.
353
394
  */
354
395
  export declare function partialBackend(name: string, impl: Partial<{
355
396
  [K in GitRequestKind]: (cwd: string, request: Extract<GitRequest, {
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAEf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAA;AAEnB,mEAAmE;AACnE,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;IAChC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAA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;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;CACpC,GACL,UAAU,CAkCZ;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,CAAC;KACX,CAAC,IAAI,cAAc,GAAG,CACrB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,EACzC,IAAI,EAAE,cAAc,KACjB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAC,GACD,UAAU,CAsBZ"}
package/dist/backend.js CHANGED
@@ -11,6 +11,11 @@
11
11
  * It also means a request can be logged, queued, or replayed as data. The one
12
12
  * request that cannot cross that line is `raw`, which is argv by definition; a
13
13
  * non-CLI backend rejects it with {@link UnsupportedRequest}.
14
+ *
15
+ * The seam is experimental: `GitBackend`, `GitRequest`, `GitResults` and
16
+ * `partialBackend`. Each new verb adds a request kind, which breaks a backend
17
+ * written as an exhaustive switch. Such a change can land in a minor release.
18
+ * `cliBackend` and `AsyncGit` are stable.
14
19
  */
15
20
  import { resolveRunnerAsync, } from '@osdlc/command-seam';
16
21
  import * as v from "./verbs.js";
@@ -39,6 +44,8 @@ function toVerb(request) {
39
44
  return v.topLevel();
40
45
  case 'gitCommonDir':
41
46
  return v.gitCommonDir();
47
+ case 'gitDir':
48
+ return v.gitDir();
42
49
  case 'symbolicRef':
43
50
  return v.symbolicRef(request.ref);
44
51
  case 'currentBranch':
@@ -56,7 +63,11 @@ function toVerb(request) {
56
63
  case 'logSubject':
57
64
  return v.logSubject(request.ref);
58
65
  case 'configGet':
59
- return v.configGet(request.key);
66
+ return v.configGet(request.key, request);
67
+ case 'configGetAll':
68
+ return v.configGetAll(request.key, request);
69
+ case 'configGetBool':
70
+ return v.configGetBool(request.key, request);
60
71
  case 'objectExists':
61
72
  return v.objectExists(request.rev);
62
73
  case 'lsRemote':
@@ -94,7 +105,7 @@ function toVerb(request) {
94
105
  case 'grep':
95
106
  return v.grep(request.pattern, request);
96
107
  case 'diffText':
97
- return v.diffText(request.rev, { staged: request.staged, paths: request.paths });
108
+ return v.diffText(request.rev, request);
98
109
  case 'diffAddedFile':
99
110
  return v.diffAddedFile(request.relPath);
100
111
  case 'fetch':
@@ -152,7 +163,11 @@ function toVerb(request) {
152
163
  case 'remote':
153
164
  return v.remote();
154
165
  case 'remoteGetUrl':
155
- return v.remoteGetUrl(request.name);
166
+ return v.remoteGetUrl(request.name, request);
167
+ case 'remoteGetUrls':
168
+ return v.remoteGetUrls(request.name, request);
169
+ case 'remoteHead':
170
+ return v.remoteHead(request.remote);
156
171
  case 'remoteAdd':
157
172
  return v.remoteAdd(request.name, request.url);
158
173
  case 'raw': {
@@ -186,12 +201,17 @@ export function cliBackend(opts = {}) {
186
201
  runOpts.timeoutMs = callOpts.timeoutMs;
187
202
  if (callOpts.signal !== undefined)
188
203
  runOpts.signal = callOpts.signal;
204
+ if (callOpts.maxOutputBytes !== undefined)
205
+ runOpts.maxOutputBytes = callOpts.maxOutputBytes;
189
206
  // Per-call entries win over the backend's, matching `Git`.
190
207
  const env = mergeEnv(opts.env, callOpts.env);
191
208
  if (env !== undefined)
192
209
  runOpts.env = env;
193
210
  if (verb.input !== undefined)
194
211
  runOpts.input = verb.input;
212
+ // The verb's own entries (the C locale) win over the backend's and the call's.
213
+ if (verb.env !== undefined)
214
+ runOpts.env = { ...runOpts.env, ...verb.env };
195
215
  const argv = prefix.length === 0 ? verb.argv : [...prefix, ...verb.argv];
196
216
  const result = await runner.run(argv, runOpts);
197
217
  // Unchecked `raw` is the one door outside the gate: it hands back
@@ -212,6 +232,8 @@ export function cliBackend(opts = {}) {
212
232
  * rejects with {@link UnsupportedRequest} instead of failing as `undefined`.
213
233
  * The way to ship a backend that covers the operations it can and says so
214
234
  * about the rest.
235
+ *
236
+ * @experimental Part of the backend seam; see {@link GitBackend}.
215
237
  */
216
238
  export function partialBackend(name, impl) {
217
239
  return {
package/dist/client.d.ts CHANGED
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * `@osdlc/typed-git/client` — the git clients and their seams, without the
3
- * git-reference parser.
3
+ * git-reference parsers and the checkout walks.
4
4
  *
5
- * Identical to the package entry minus `parseGitUrl` / `gitSshUrl`, which
6
- * pull in `hosted-git-info`. A consumer that only drives git — a runner
7
- * discovery pass, a guard script — imports from here and keeps that off its
8
- * module graph. It stays in `dependencies` either way, so this is a bundle
9
- * saving, not an install one.
5
+ * The package entry minus two groups. The first is `parseGitUrl`,
6
+ * `gitSshUrl`, `parseRepoRef` and their types, which pull in
7
+ * `hosted-git-info`. The second is the checkout walks: `checkoutRoot`,
8
+ * `discoverCheckouts`, `scanForCheckouts`, their types and their defaults. A
9
+ * consumer that only drives git — a runner discovery pass, a guard script —
10
+ * imports from here and keeps `hosted-git-info` off its module graph. It stays
11
+ * in `dependencies` either way, so this is a bundle saving, not an install
12
+ * one.
10
13
  *
11
14
  * The package entry is defined as this module plus the URL exports, so there
12
15
  * is one definition of the surface rather than two lists to keep in step.
@@ -16,6 +19,6 @@ export { AsyncGit } from './async.ts';
16
19
  export { parseRemoteUrl, type RemoteCoordinate } from './remote-url.ts';
17
20
  export { cliBackend, partialBackend, UnsupportedRequest, type GitBackend, type GitCallOptions, type GitRequest, type GitRequestKind, type GitResults, } from './backend.ts';
18
21
  export { type GitOutcome, type Soft, type TriedAsync, type TriedSync } from './outcome.ts';
19
- export { forceWithLeaseArg, gate, parseRefRows, REF_FORMAT, type AddOptions, type AheadBehind, type CheckoutOptions, type CloneOptions, type CommitOptions, type ConfigSetOptions, type ConflictSide, type DiffEntry, type DiffNameOnlyOptions, type DiffNameStatusOptions, type DiffStatOptions, type DiffTreeOptions, type FetchOptions, type ForEachRefOptions, type ForceLease, type GitVerb, type GrepOptions, type InitOptions, type IntegrationOutcome, type LogOptions, type IgnoreMatch, type LsFilesOptions, type LsRemoteOptions, type LsTreeOptions, type MergeOptions, type MergeOutcome, type MergeTreeOptions, type MergeTreeOutcome, type NumstatEntry, type RebaseOptions, type RebaseOutcome, type RemoteRef, type StatusPorcelainOptions, type TaggedFile, type TreeEntry, type UnmergedEntry, type Worktree, type WorktreeMoveOptions, } from './verbs.ts';
22
+ export { forceWithLeaseArg, parseRefRows, REF_FORMAT, type AddOptions, type AheadBehind, type CheckoutOptions, type CleanOptions, type CloneOptions, type CommitFlags, type CommitOptions, type ConfigGetOptions, type ConfigScope, type ConfigSetOptions, type ConflictSide, type DiffCheckOptions, type DiffCheckResult, type DiffEntry, type DiffNameOnlyOptions, type DiffNameStatusOptions, type DiffStatOptions, type DiffTextOptions, type DiffTreeOptions, type FetchOptions, type ForEachRefOptions, type ForceLease, type GrepOptions, type InitOptions, type IntegrationOutcome, type LogOptions, type IgnoreMatch, type LsFilesOptions, type LsRemoteOptions, type LsTreeOptions, type MergeOptions, type MergeOutcome, type MergeTreeOptions, type MergeTreeOutcome, type NumstatEntry, type RebaseOptions, type RebaseOutcome, type RemoteGetUrlOptions, type RemoteRef, type StatusEntry, type StatusPorcelainOptions, type TaggedFile, type TreeEntry, type UnmergedEntry, type Worktree, type WorktreeMoveOptions, } from './verbs.ts';
20
23
  export { asAsync, CommandFailed, runChecked, runCheckedAsync, spawnRunner, spawnRunnerAsync, type AsyncCommandRunner, type AsyncCommandRunOptions, type CommandResult, type CommandRunner, type CommandRunOptions, } from '@osdlc/command-seam';
21
24
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,GAAG,EAAE,KAAK,kBAAkB,EAAE,MAAM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B,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAA;AAKnB,OAAO,EACL,OAAO,EACP,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAA"}
package/dist/client.js CHANGED
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * `@osdlc/typed-git/client` — the git clients and their seams, without the
3
- * git-reference parser.
3
+ * git-reference parsers and the checkout walks.
4
4
  *
5
- * Identical to the package entry minus `parseGitUrl` / `gitSshUrl`, which
6
- * pull in `hosted-git-info`. A consumer that only drives git — a runner
7
- * discovery pass, a guard script — imports from here and keeps that off its
8
- * module graph. It stays in `dependencies` either way, so this is a bundle
9
- * saving, not an install one.
5
+ * The package entry minus two groups. The first is `parseGitUrl`,
6
+ * `gitSshUrl`, `parseRepoRef` and their types, which pull in
7
+ * `hosted-git-info`. The second is the checkout walks: `checkoutRoot`,
8
+ * `discoverCheckouts`, `scanForCheckouts`, their types and their defaults. A
9
+ * consumer that only drives git — a runner discovery pass, a guard script —
10
+ * imports from here and keeps `hosted-git-info` off its module graph. It stays
11
+ * in `dependencies` either way, so this is a bundle saving, not an install
12
+ * one.
10
13
  *
11
14
  * The package entry is defined as this module plus the URL exports, so there
12
15
  * is one definition of the surface rather than two lists to keep in step.
@@ -16,7 +19,7 @@ export { AsyncGit } from "./async.js";
16
19
  export { parseRemoteUrl } from "./remote-url.js";
17
20
  export { cliBackend, partialBackend, UnsupportedRequest, } from "./backend.js";
18
21
  export {} from "./outcome.js";
19
- export { forceWithLeaseArg, gate, parseRefRows, REF_FORMAT, } from "./verbs.js";
22
+ export { forceWithLeaseArg, parseRefRows, REF_FORMAT, } from "./verbs.js";
20
23
  // The subprocess seam is re-exported so a caller wiring a runner or catching
21
24
  // a failure needs one import, not two. `@osdlc/command-seam` is the package
22
25
  // that owns these; it is usable on its own, without a git client.
package/dist/index.d.ts CHANGED
@@ -27,8 +27,8 @@
27
27
  * `parseRemoteUrl` written in each client.
28
28
  *
29
29
  * Subpath exports: `./client` is everything here except the git-reference
30
- * parsers (and so without `hosted-git-info` on the module graph); `./testing`
31
- * is the temp-repo fixture builder.
30
+ * parsers and the checkout walks (and so without `hosted-git-info` on the
31
+ * module graph); `./testing` is the temp-repo fixture builder.
32
32
  */
33
33
  export * from './client.ts';
34
34
  export { parseGitUrl, gitSshUrl, parseRepoRef, type GitHostInfo, type RepoRef, type CloneProtocol, } from './git-url.ts';
package/dist/index.js CHANGED
@@ -27,8 +27,8 @@
27
27
  * `parseRemoteUrl` written in each client.
28
28
  *
29
29
  * Subpath exports: `./client` is everything here except the git-reference
30
- * parsers (and so without `hosted-git-info` on the module graph); `./testing`
31
- * is the temp-repo fixture builder.
30
+ * parsers and the checkout walks (and so without `hosted-git-info` on the
31
+ * module graph); `./testing` is the temp-repo fixture builder.
32
32
  */
33
33
  export * from "./client.js";
34
34
  export { parseGitUrl, gitSshUrl, parseRepoRef, } from "./git-url.js";
package/dist/outcome.d.ts CHANGED
@@ -54,9 +54,14 @@ export declare function triedAsync<C extends object>(client: C): TriedAsync<C>;
54
54
  */
55
55
  type SoftKind<R> = R extends readonly unknown[] ? 'empty' : null extends R ? 'null' : R extends boolean ? 'false' : never;
56
56
  type Unwrap<R> = R extends Promise<infer U> ? U : R;
57
+ /**
58
+ * Methods left out of the soft door although their return type has an absence
59
+ * value. `configRemoveSection` is a mutation, and no mutation has a soft form.
60
+ */
61
+ type NoSoftForm = 'configRemoveSection';
57
62
  /** The client methods that have an absence value, each mapped to its {@link SoftKind}. */
58
63
  export type SoftKinds<C> = {
59
- [K in keyof Triable<C> as Triable<C>[K] extends (...a: never[]) => infer R ? [SoftKind<Unwrap<R>>] extends [never] ? never : K : never]: Triable<C>[K] extends (...a: never[]) => infer R ? SoftKind<Unwrap<R>> : never;
64
+ [K in keyof Triable<C> as K extends NoSoftForm ? never : Triable<C>[K] extends (...a: never[]) => infer R ? [SoftKind<Unwrap<R>>] extends [never] ? never : K : never]: Triable<C>[K] extends (...a: never[]) => infer R ? SoftKind<Unwrap<R>> : never;
60
65
  };
61
66
  /**
62
67
  * Every client method that has an absence value, returning that value
@@ -1 +1 @@
1
- {"version":3,"file":"outcome.d.ts","sourceRoot":"","sources":["../outcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,yDAAyD;AACzD,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAA;AAExF;;;;;;;GAOG;AACH,KAAK,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,KAAK,GAAG,YAAY,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC,CAAA;AAE/E,uEAAuE;AACvE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAA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EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAElE,4FAA4F;AAC5F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAY1C,mFAAmF;AACnF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAS/E;AAED,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAShF"}
@@ -22,6 +22,9 @@ export interface RemoteCoordinate {
22
22
  * are the owner and repo, so a nested group (`group/sub/repo`) answers
23
23
  * `owner: "sub"`. Returns null for anything else (a local path, a single
24
24
  * path segment).
25
+ *
26
+ * Only an `http(s)://` port is read. An `ssh://` port is dropped, so `port` is
27
+ * null for `ssh://git@host:2222/owner/repo.git`.
25
28
  */
26
29
  export declare function parseRemoteUrl(url: string): RemoteCoordinate | null;
27
30
  //# sourceMappingURL=remote-url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-url.d.ts","sourceRoot":"","sources":["../remote-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,uGAAuG;IACvG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAenE"}
1
+ {"version":3,"file":"remote-url.d.ts","sourceRoot":"","sources":["../remote-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,uGAAuG;IACvG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAenE"}
@@ -14,6 +14,9 @@
14
14
  * are the owner and repo, so a nested group (`group/sub/repo`) answers
15
15
  * `owner: "sub"`. Returns null for anything else (a local path, a single
16
16
  * path segment).
17
+ *
18
+ * Only an `http(s)://` port is read. An `ssh://` port is dropped, so `port` is
19
+ * null for `ssh://git@host:2222/owner/repo.git`.
17
20
  */
18
21
  export function parseRemoteUrl(url) {
19
22
  const trimmed = url.trim();