type-git 0.3.0-alpha.1 → 0.3.0-alpha.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/README.md +14 -0
- package/dist/adapters/bun/index.cjs +2 -2
- package/dist/adapters/bun/index.cjs.map +1 -1
- package/dist/adapters/bun/index.d.cts +1 -1
- package/dist/adapters/bun/index.d.ts +1 -1
- package/dist/adapters/bun/index.js +2 -2
- package/dist/adapters/bun/index.js.map +1 -1
- package/dist/adapters/deno/index.cjs +35 -2
- package/dist/adapters/deno/index.cjs.map +1 -1
- package/dist/adapters/deno/index.d.cts +1 -1
- package/dist/adapters/deno/index.d.ts +1 -1
- package/dist/adapters/deno/index.js +35 -2
- package/dist/adapters/deno/index.js.map +1 -1
- package/dist/adapters/node/index.cjs +230 -61
- package/dist/adapters/node/index.cjs.map +1 -1
- package/dist/adapters/node/index.d.cts +57 -6
- package/dist/adapters/node/index.d.ts +57 -6
- package/dist/adapters/node/index.js +230 -61
- package/dist/adapters/node/index.js.map +1 -1
- package/dist/{adapters-Bpuvmw9y.d.cts → adapters-CZ8wj9Kr.d.cts} +60 -8
- package/dist/{adapters-Bpuvmw9y.d.ts → adapters-CZ8wj9Kr.d.ts} +60 -8
- package/dist/index.cjs +230 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +230 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GitErrorCategory, e as ExecOpts, f as RawResult, L as LfsMode, g as GitProgress, h as GitOpenOptions, i as EnvInheritance, A as AuditConfig, R as RuntimeAdapters, j as ExecutionContext, k as GitError, E as ExecAdapter, C as Capabilities, S as SpawnOptions, a as StreamHandler, b as SpawnResult, c as SpawnHandle, F as FsAdapter, T as TailOptions, d as TailHandle } from '../../adapters-
|
|
1
|
+
import { G as GitErrorCategory, e as ExecOpts, f as RawResult, L as LfsMode, g as GitProgress, h as GitOpenOptions, i as EnvInheritance, A as AuditConfig, R as RuntimeAdapters, j as ExecutionContext, k as GitError, E as ExecAdapter, C as Capabilities, S as SpawnOptions, a as StreamHandler, b as SpawnResult, c as SpawnHandle, F as FsAdapter, T as TailOptions, d as TailHandle } from '../../adapters-CZ8wj9Kr.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* stdout parsing utilities for Git output
|
|
@@ -1781,8 +1781,10 @@ type LfsPushOpts = {
|
|
|
1781
1781
|
ref?: string;
|
|
1782
1782
|
/** Dry run - show what would be pushed without actually pushing */
|
|
1783
1783
|
dryRun?: boolean;
|
|
1784
|
-
/** Push specified object IDs (OID hashes) instead of all objects */
|
|
1784
|
+
/** Push specified object IDs (OID hashes) instead of all objects. Empty arrays require stdin: true. */
|
|
1785
1785
|
objectId?: string | string[];
|
|
1786
|
+
/** Send objectId values (or ref) as newline-delimited standard input. Requires objectId or ref. */
|
|
1787
|
+
stdin?: boolean;
|
|
1786
1788
|
};
|
|
1787
1789
|
/**
|
|
1788
1790
|
* Options for LFS status
|
|
@@ -2141,8 +2143,34 @@ type LfsEnvInfo = {
|
|
|
2141
2143
|
type LfsPreUploadOpts = {
|
|
2142
2144
|
/** Object IDs to upload (if omitted, auto-detect pending objects) */
|
|
2143
2145
|
oids?: string[];
|
|
2144
|
-
/**
|
|
2146
|
+
/**
|
|
2147
|
+
* Number of OIDs per `git lfs push --object-id` invocation (default: 200).
|
|
2148
|
+
*
|
|
2149
|
+
* Each batch is one spawned process, so the batch size is bounded by the
|
|
2150
|
+
* OS command-line length limit. Git is spawned without a shell, so the
|
|
2151
|
+
* binding limit is the Windows CreateProcess limit (32,767 characters);
|
|
2152
|
+
* the default stays around 40% of it.
|
|
2153
|
+
*/
|
|
2145
2154
|
batchSize?: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* Maximum number of batches uploaded concurrently (default: 4).
|
|
2157
|
+
*
|
|
2158
|
+
* Each `git lfs push` invocation pays a fixed cost (process spawn,
|
|
2159
|
+
* credential lookup, LFS batch API round-trip) before any bytes are
|
|
2160
|
+
* transferred; concurrent batches overlap that cost with other batches'
|
|
2161
|
+
* transfers. The first batch always runs alone and the remaining batches
|
|
2162
|
+
* start only after it succeeds, so a failure common to all batches (e.g.
|
|
2163
|
+
* an unreachable remote) costs a single round-trip. Once a batch fails, no
|
|
2164
|
+
* new batch is started; in-flight batches are awaited and the remaining
|
|
2165
|
+
* objects are reported in `skippedCount`. Set to 1 for strictly serial
|
|
2166
|
+
* uploads.
|
|
2167
|
+
*
|
|
2168
|
+
* Note: each `git lfs push` process transfers multiple objects in parallel
|
|
2169
|
+
* on its own (`lfs.concurrenttransfers`, default 8), so the peak transfer
|
|
2170
|
+
* parallelism is `concurrency` times that value. With `concurrency` > 1,
|
|
2171
|
+
* progress callbacks from different batches may interleave.
|
|
2172
|
+
*/
|
|
2173
|
+
concurrency?: number;
|
|
2146
2174
|
/** Remote name (default: 'origin') */
|
|
2147
2175
|
remote?: string;
|
|
2148
2176
|
};
|
|
@@ -2154,7 +2182,11 @@ type LfsPreUploadResult = {
|
|
|
2154
2182
|
uploadedCount: number;
|
|
2155
2183
|
/** Total bytes uploaded */
|
|
2156
2184
|
uploadedBytes: number;
|
|
2157
|
-
/**
|
|
2185
|
+
/**
|
|
2186
|
+
* Number of objects not uploaded: the objects of the batch that failed or
|
|
2187
|
+
* was aborted, plus those of the batches never started after that failure.
|
|
2188
|
+
* `uploadedCount + skippedCount` always equals the number of objects.
|
|
2189
|
+
*/
|
|
2158
2190
|
skippedCount: number;
|
|
2159
2191
|
};
|
|
2160
2192
|
/**
|
|
@@ -3959,6 +3991,25 @@ type CliRunnerOptions = {
|
|
|
3959
3991
|
/** Audit configuration for command tracking and tracing */
|
|
3960
3992
|
audit?: AuditConfig;
|
|
3961
3993
|
};
|
|
3994
|
+
/**
|
|
3995
|
+
* Per-call options for {@link CliRunner.run} / {@link CliRunner.runOrThrow}.
|
|
3996
|
+
*
|
|
3997
|
+
* Extends {@link ExecOpts} with an `env` overlay so callers (e.g. the repository
|
|
3998
|
+
* implementations) can inject command-specific environment variables — such as
|
|
3999
|
+
* `GIT_LFS_SKIP_SMUDGE` for an LFS skip-smudge mode. This keeps `env` out of the
|
|
4000
|
+
* public `ExecOpts` / repository operation option types, scoping it to the
|
|
4001
|
+
* runner's own `run` / `runOrThrow` entry points.
|
|
4002
|
+
*/
|
|
4003
|
+
type RunOptions = ExecOpts & {
|
|
4004
|
+
/** UTF-8 text to write to standard input, then close it. */
|
|
4005
|
+
stdin?: string;
|
|
4006
|
+
/**
|
|
4007
|
+
* Extra environment variables merged on top of the resolved environment for
|
|
4008
|
+
* this single command. Values here take precedence over the configured
|
|
4009
|
+
* environment but do not persist across calls.
|
|
4010
|
+
*/
|
|
4011
|
+
env?: Record<string, string>;
|
|
4012
|
+
};
|
|
3962
4013
|
/**
|
|
3963
4014
|
* CLI Runner for executing Git commands
|
|
3964
4015
|
*
|
|
@@ -4004,7 +4055,7 @@ declare class CliRunner {
|
|
|
4004
4055
|
/**
|
|
4005
4056
|
* Run a Git command
|
|
4006
4057
|
*/
|
|
4007
|
-
run(context: ExecutionContext, args: string[], opts?:
|
|
4058
|
+
run(context: ExecutionContext, args: string[], opts?: RunOptions): Promise<RawResult>;
|
|
4008
4059
|
/**
|
|
4009
4060
|
* Process a single line from stderr for progress and trace callbacks
|
|
4010
4061
|
*/
|
|
@@ -4024,7 +4075,7 @@ declare class CliRunner {
|
|
|
4024
4075
|
/**
|
|
4025
4076
|
* Run a command and throw on error
|
|
4026
4077
|
*/
|
|
4027
|
-
runOrThrow(context: ExecutionContext, args: string[], opts?:
|
|
4078
|
+
runOrThrow(context: ExecutionContext, args: string[], opts?: RunOptions): Promise<RawResult>;
|
|
4028
4079
|
}
|
|
4029
4080
|
|
|
4030
4081
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GitErrorCategory, e as ExecOpts, f as RawResult, L as LfsMode, g as GitProgress, h as GitOpenOptions, i as EnvInheritance, A as AuditConfig, R as RuntimeAdapters, j as ExecutionContext, k as GitError, E as ExecAdapter, C as Capabilities, S as SpawnOptions, a as StreamHandler, b as SpawnResult, c as SpawnHandle, F as FsAdapter, T as TailOptions, d as TailHandle } from '../../adapters-
|
|
1
|
+
import { G as GitErrorCategory, e as ExecOpts, f as RawResult, L as LfsMode, g as GitProgress, h as GitOpenOptions, i as EnvInheritance, A as AuditConfig, R as RuntimeAdapters, j as ExecutionContext, k as GitError, E as ExecAdapter, C as Capabilities, S as SpawnOptions, a as StreamHandler, b as SpawnResult, c as SpawnHandle, F as FsAdapter, T as TailOptions, d as TailHandle } from '../../adapters-CZ8wj9Kr.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* stdout parsing utilities for Git output
|
|
@@ -1781,8 +1781,10 @@ type LfsPushOpts = {
|
|
|
1781
1781
|
ref?: string;
|
|
1782
1782
|
/** Dry run - show what would be pushed without actually pushing */
|
|
1783
1783
|
dryRun?: boolean;
|
|
1784
|
-
/** Push specified object IDs (OID hashes) instead of all objects */
|
|
1784
|
+
/** Push specified object IDs (OID hashes) instead of all objects. Empty arrays require stdin: true. */
|
|
1785
1785
|
objectId?: string | string[];
|
|
1786
|
+
/** Send objectId values (or ref) as newline-delimited standard input. Requires objectId or ref. */
|
|
1787
|
+
stdin?: boolean;
|
|
1786
1788
|
};
|
|
1787
1789
|
/**
|
|
1788
1790
|
* Options for LFS status
|
|
@@ -2141,8 +2143,34 @@ type LfsEnvInfo = {
|
|
|
2141
2143
|
type LfsPreUploadOpts = {
|
|
2142
2144
|
/** Object IDs to upload (if omitted, auto-detect pending objects) */
|
|
2143
2145
|
oids?: string[];
|
|
2144
|
-
/**
|
|
2146
|
+
/**
|
|
2147
|
+
* Number of OIDs per `git lfs push --object-id` invocation (default: 200).
|
|
2148
|
+
*
|
|
2149
|
+
* Each batch is one spawned process, so the batch size is bounded by the
|
|
2150
|
+
* OS command-line length limit. Git is spawned without a shell, so the
|
|
2151
|
+
* binding limit is the Windows CreateProcess limit (32,767 characters);
|
|
2152
|
+
* the default stays around 40% of it.
|
|
2153
|
+
*/
|
|
2145
2154
|
batchSize?: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* Maximum number of batches uploaded concurrently (default: 4).
|
|
2157
|
+
*
|
|
2158
|
+
* Each `git lfs push` invocation pays a fixed cost (process spawn,
|
|
2159
|
+
* credential lookup, LFS batch API round-trip) before any bytes are
|
|
2160
|
+
* transferred; concurrent batches overlap that cost with other batches'
|
|
2161
|
+
* transfers. The first batch always runs alone and the remaining batches
|
|
2162
|
+
* start only after it succeeds, so a failure common to all batches (e.g.
|
|
2163
|
+
* an unreachable remote) costs a single round-trip. Once a batch fails, no
|
|
2164
|
+
* new batch is started; in-flight batches are awaited and the remaining
|
|
2165
|
+
* objects are reported in `skippedCount`. Set to 1 for strictly serial
|
|
2166
|
+
* uploads.
|
|
2167
|
+
*
|
|
2168
|
+
* Note: each `git lfs push` process transfers multiple objects in parallel
|
|
2169
|
+
* on its own (`lfs.concurrenttransfers`, default 8), so the peak transfer
|
|
2170
|
+
* parallelism is `concurrency` times that value. With `concurrency` > 1,
|
|
2171
|
+
* progress callbacks from different batches may interleave.
|
|
2172
|
+
*/
|
|
2173
|
+
concurrency?: number;
|
|
2146
2174
|
/** Remote name (default: 'origin') */
|
|
2147
2175
|
remote?: string;
|
|
2148
2176
|
};
|
|
@@ -2154,7 +2182,11 @@ type LfsPreUploadResult = {
|
|
|
2154
2182
|
uploadedCount: number;
|
|
2155
2183
|
/** Total bytes uploaded */
|
|
2156
2184
|
uploadedBytes: number;
|
|
2157
|
-
/**
|
|
2185
|
+
/**
|
|
2186
|
+
* Number of objects not uploaded: the objects of the batch that failed or
|
|
2187
|
+
* was aborted, plus those of the batches never started after that failure.
|
|
2188
|
+
* `uploadedCount + skippedCount` always equals the number of objects.
|
|
2189
|
+
*/
|
|
2158
2190
|
skippedCount: number;
|
|
2159
2191
|
};
|
|
2160
2192
|
/**
|
|
@@ -3959,6 +3991,25 @@ type CliRunnerOptions = {
|
|
|
3959
3991
|
/** Audit configuration for command tracking and tracing */
|
|
3960
3992
|
audit?: AuditConfig;
|
|
3961
3993
|
};
|
|
3994
|
+
/**
|
|
3995
|
+
* Per-call options for {@link CliRunner.run} / {@link CliRunner.runOrThrow}.
|
|
3996
|
+
*
|
|
3997
|
+
* Extends {@link ExecOpts} with an `env` overlay so callers (e.g. the repository
|
|
3998
|
+
* implementations) can inject command-specific environment variables — such as
|
|
3999
|
+
* `GIT_LFS_SKIP_SMUDGE` for an LFS skip-smudge mode. This keeps `env` out of the
|
|
4000
|
+
* public `ExecOpts` / repository operation option types, scoping it to the
|
|
4001
|
+
* runner's own `run` / `runOrThrow` entry points.
|
|
4002
|
+
*/
|
|
4003
|
+
type RunOptions = ExecOpts & {
|
|
4004
|
+
/** UTF-8 text to write to standard input, then close it. */
|
|
4005
|
+
stdin?: string;
|
|
4006
|
+
/**
|
|
4007
|
+
* Extra environment variables merged on top of the resolved environment for
|
|
4008
|
+
* this single command. Values here take precedence over the configured
|
|
4009
|
+
* environment but do not persist across calls.
|
|
4010
|
+
*/
|
|
4011
|
+
env?: Record<string, string>;
|
|
4012
|
+
};
|
|
3962
4013
|
/**
|
|
3963
4014
|
* CLI Runner for executing Git commands
|
|
3964
4015
|
*
|
|
@@ -4004,7 +4055,7 @@ declare class CliRunner {
|
|
|
4004
4055
|
/**
|
|
4005
4056
|
* Run a Git command
|
|
4006
4057
|
*/
|
|
4007
|
-
run(context: ExecutionContext, args: string[], opts?:
|
|
4058
|
+
run(context: ExecutionContext, args: string[], opts?: RunOptions): Promise<RawResult>;
|
|
4008
4059
|
/**
|
|
4009
4060
|
* Process a single line from stderr for progress and trace callbacks
|
|
4010
4061
|
*/
|
|
@@ -4024,7 +4075,7 @@ declare class CliRunner {
|
|
|
4024
4075
|
/**
|
|
4025
4076
|
* Run a command and throw on error
|
|
4026
4077
|
*/
|
|
4027
|
-
runOrThrow(context: ExecutionContext, args: string[], opts?:
|
|
4078
|
+
runOrThrow(context: ExecutionContext, args: string[], opts?: RunOptions): Promise<RawResult>;
|
|
4028
4079
|
}
|
|
4029
4080
|
|
|
4030
4081
|
/**
|