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.
- package/README.md +100 -0
- package/dist/adapters/bun/index.cjs +19 -8
- package/dist/adapters/bun/index.d.cts +3 -2
- package/dist/adapters/bun/index.d.ts +3 -2
- package/dist/adapters/bun/index.js +14 -3
- package/dist/adapters/deno/index.cjs +23 -8
- package/dist/adapters/deno/index.d.cts +3 -2
- package/dist/adapters/deno/index.d.ts +3 -2
- package/dist/adapters/deno/index.js +17 -2
- package/dist/adapters/node/index.cjs +4 -4
- package/dist/adapters/node/index.d.cts +3 -2
- package/dist/adapters/node/index.d.ts +3 -2
- package/dist/adapters/node/index.js +3 -3
- package/dist/{chunk-MFY7MGIJ.cjs → chunk-6HDMSFY7.cjs} +1388 -129
- package/dist/{chunk-YIWTIIXH.js → chunk-ADC26634.js} +467 -27
- package/dist/{chunk-X3F6MDXQ.cjs → chunk-JDCCYWIX.cjs} +18 -7
- package/dist/{chunk-IAJF67MB.js → chunk-S3EFBFVP.js} +13 -2
- package/dist/{chunk-5NI3KM5Z.js → chunk-UAKOSACD.js} +1329 -70
- package/dist/{chunk-NBX6BNQF.cjs → chunk-UHZWPYTF.cjs} +1421 -981
- package/dist/{client.d-Cs32YZX6.d.ts → client.d-Cg5wWJnY.d.cts} +20 -2
- package/dist/{client.d-PRQCR2_T.d.cts → client.d-DCiFA_CK.d.ts} +20 -2
- package/dist/{git.d-DrhCzWEn.d.cts → git.d-DqAvRXEf.d.cts} +926 -117
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/strict/command-data.cjs +3 -0
- package/dist/strict/index.cjs +235 -206
- package/dist/strict/index.d.cts +66309 -124868
- package/dist/strict/index.js +32 -3
- package/package.json +1 -1
|
@@ -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-
|
|
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
|
|
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-
|
|
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
|
|
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
|
*/
|