type-git 0.7.0 → 0.8.1

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.
@@ -1,4 +1,4 @@
1
- import { C as Capabilities, a as CompanionExecutable, E as EnvInheritance, A as AuditConfig, b as ExecutionContext, c as ExecOpts, R as RawResult, d as GitError, G as Git, e as GitOpenOptions, W as WorktreeRepo, B as BareRepo, f as CloneOpts, I as InitOpts, L as LsRemoteOpts, g as LsRemoteResult, h as CommandExecOpts, i as GlobalConfigOperations, j as GlobalLfsOperations } from './git.d-DrhCzWEn.cjs';
1
+ import { C as Capabilities, a as CompanionExecutable, E as EnvInheritance, A as AuditConfig, b as ExecutionContext, c as ExecOpts, R as RawResult, d as GitError, G as Git, e as GitOpenOptions, W as WorktreeRepo, B as BareRepo, f as CloneOpts, I as InitOpts, L as LsRemoteOpts, g as LsRemoteResult, h as CommandExecOpts, i as GlobalConfigOperations, j as GlobalLfsOperations } from './git.d-DqAvRXEf.cjs';
2
2
 
3
3
  /**
4
4
  * Runtime adapter interfaces for cross-platform support (Node/Deno/Bun)
@@ -226,6 +226,16 @@ interface FsAdapter {
226
226
  * @returns Whether the file exists
227
227
  */
228
228
  exists(filePath: string): Promise<boolean>;
229
+ /**
230
+ * List the names of a directory's entries
231
+ *
232
+ * Used by `git.open(path, { untrusted: true })`, which fails with `CapabilityMissing` when the
233
+ * adapter does not provide it.
234
+ *
235
+ * @param dirPath - Path to the directory
236
+ * @returns Entry names, or an empty array when the directory does not exist
237
+ */
238
+ readDirectory?(dirPath: string): Promise<string[]>;
229
239
  /**
230
240
  * Read a file's contents
231
241
  *
@@ -290,6 +300,11 @@ type CliRunnerOptions = {
290
300
  credential?: CredentialHelperConfig;
291
301
  /** Audit configuration for command tracking and tracing */
292
302
  audit?: AuditConfig;
303
+ /**
304
+ * `key=value` configuration passed with `-c` to every command (and to companion programs
305
+ * through `GIT_CONFIG_PARAMETERS`). Merged runners append to the parent's list.
306
+ */
307
+ configOverrides?: readonly string[];
293
308
  };
294
309
  /**
295
310
  * Per-call options for {@link CliRunner.run} / {@link CliRunner.runOrThrow}.
@@ -301,7 +316,7 @@ type CliRunnerOptions = {
301
316
  * runner's own `run` / `runOrThrow` entry points.
302
317
  */
303
318
  type RunOptions = ExecOpts & {
304
- /** UTF-8 text to write to standard input, then close it. */
319
+ /** Data written to standard input (UTF-8 for a string, bytes unchanged), then closed. */
305
320
  stdin?: string | Uint8Array;
306
321
  /**
307
322
  * Extra environment variables merged on top of the resolved environment for
@@ -330,6 +345,7 @@ declare class CliRunner {
330
345
  private readonly home;
331
346
  private readonly credential;
332
347
  private readonly audit;
348
+ private readonly configOverrides;
333
349
  constructor(adapters: RuntimeAdapters, options?: CliRunnerOptions);
334
350
  /**
335
351
  * Create a new CliRunner with additional options merged
@@ -337,6 +353,8 @@ declare class CliRunner {
337
353
  * Used to create a runner for a specific repository with custom environment
338
354
  */
339
355
  withOptions(options: CliRunnerOptions): CliRunner;
356
+ /** `key=value` pairs passed with `-c`: the credential helper, then the configured overrides. */
357
+ private configParameters;
340
358
  /**
341
359
  * Build command argv based on execution context
342
360
  */
@@ -1,4 +1,4 @@
1
- import { C as Capabilities, a as CompanionExecutable, E as EnvInheritance, A as AuditConfig, b as ExecutionContext, c as ExecOpts, R as RawResult, d as GitError, G as Git, e as GitOpenOptions, W as WorktreeRepo, B as BareRepo, f as CloneOpts, I as InitOpts, L as LsRemoteOpts, g as LsRemoteResult, h as CommandExecOpts, i as GlobalConfigOperations, j as GlobalLfsOperations } from './git.d-DrhCzWEn.cjs';
1
+ import { C as Capabilities, a as CompanionExecutable, E as EnvInheritance, A as AuditConfig, b as ExecutionContext, c as ExecOpts, R as RawResult, d as GitError, G as Git, e as GitOpenOptions, W as WorktreeRepo, B as BareRepo, f as CloneOpts, I as InitOpts, L as LsRemoteOpts, g as LsRemoteResult, h as CommandExecOpts, i as GlobalConfigOperations, j as GlobalLfsOperations } from './git.d-DqAvRXEf.cjs';
2
2
 
3
3
  /**
4
4
  * Runtime adapter interfaces for cross-platform support (Node/Deno/Bun)
@@ -226,6 +226,16 @@ interface FsAdapter {
226
226
  * @returns Whether the file exists
227
227
  */
228
228
  exists(filePath: string): Promise<boolean>;
229
+ /**
230
+ * List the names of a directory's entries
231
+ *
232
+ * Used by `git.open(path, { untrusted: true })`, which fails with `CapabilityMissing` when the
233
+ * adapter does not provide it.
234
+ *
235
+ * @param dirPath - Path to the directory
236
+ * @returns Entry names, or an empty array when the directory does not exist
237
+ */
238
+ readDirectory?(dirPath: string): Promise<string[]>;
229
239
  /**
230
240
  * Read a file's contents
231
241
  *
@@ -290,6 +300,11 @@ type CliRunnerOptions = {
290
300
  credential?: CredentialHelperConfig;
291
301
  /** Audit configuration for command tracking and tracing */
292
302
  audit?: AuditConfig;
303
+ /**
304
+ * `key=value` configuration passed with `-c` to every command (and to companion programs
305
+ * through `GIT_CONFIG_PARAMETERS`). Merged runners append to the parent's list.
306
+ */
307
+ configOverrides?: readonly string[];
293
308
  };
294
309
  /**
295
310
  * Per-call options for {@link CliRunner.run} / {@link CliRunner.runOrThrow}.
@@ -301,7 +316,7 @@ type CliRunnerOptions = {
301
316
  * runner's own `run` / `runOrThrow` entry points.
302
317
  */
303
318
  type RunOptions = ExecOpts & {
304
- /** UTF-8 text to write to standard input, then close it. */
319
+ /** Data written to standard input (UTF-8 for a string, bytes unchanged), then closed. */
305
320
  stdin?: string | Uint8Array;
306
321
  /**
307
322
  * Extra environment variables merged on top of the resolved environment for
@@ -330,6 +345,7 @@ declare class CliRunner {
330
345
  private readonly home;
331
346
  private readonly credential;
332
347
  private readonly audit;
348
+ private readonly configOverrides;
333
349
  constructor(adapters: RuntimeAdapters, options?: CliRunnerOptions);
334
350
  /**
335
351
  * Create a new CliRunner with additional options merged
@@ -337,6 +353,8 @@ declare class CliRunner {
337
353
  * Used to create a runner for a specific repository with custom environment
338
354
  */
339
355
  withOptions(options: CliRunnerOptions): CliRunner;
356
+ /** `key=value` pairs passed with `-c`: the credential helper, then the configured overrides. */
357
+ private configParameters;
340
358
  /**
341
359
  * Build command argv based on execution context
342
360
  */