@scolladon/tsgit 1.3.0 → 2.0.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 +3 -2
- package/dist/cjs/adapters/browser/index.cjs +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/chunks/adapter-detect-CD_LcgaH.cjs +2 -0
- package/dist/cjs/chunks/adapter-detect-CD_LcgaH.cjs.map +1 -0
- package/dist/cjs/chunks/{browser-http-transport-D4NH-8oJ.cjs → browser-http-transport-CiMRqtDS.cjs} +2 -2
- package/dist/cjs/chunks/browser-http-transport-CiMRqtDS.cjs.map +1 -0
- package/dist/cjs/chunks/error-CfjFO3x_.cjs +2 -0
- package/dist/cjs/chunks/error-CfjFO3x_.cjs.map +1 -0
- package/dist/cjs/chunks/index-BWCq_5BJ.cjs +2 -0
- package/dist/cjs/chunks/index-BWCq_5BJ.cjs.map +1 -0
- package/dist/cjs/chunks/memory-http-transport-BVL6VgB-.cjs +2 -0
- package/dist/cjs/chunks/memory-http-transport-BVL6VgB-.cjs.map +1 -0
- package/dist/cjs/chunks/node-http-transport-BvfVcf02.cjs +2 -0
- package/dist/cjs/chunks/node-http-transport-BvfVcf02.cjs.map +1 -0
- package/dist/cjs/chunks/{progress-Bj2w-90A.cjs → progress-CxU62NC1.cjs} +2 -2
- package/dist/cjs/chunks/{progress-Bj2w-90A.cjs.map → progress-CxU62NC1.cjs.map} +1 -1
- package/dist/cjs/chunks/repository-BEg2zNtx.cjs +2 -0
- package/dist/cjs/chunks/repository-BEg2zNtx.cjs.map +1 -0
- package/dist/cjs/chunks/walk-submodules-D2Sp7JEB.cjs +2 -0
- package/dist/cjs/chunks/walk-submodules-D2Sp7JEB.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.cjs.map +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/primitives/index.cjs +1 -1
- package/dist/cjs/primitives/index.cjs.map +1 -1
- package/dist/esm/adapters/browser/index.js +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/adapter-detect-DkZhhUhd.js +2 -0
- package/dist/esm/chunks/adapter-detect-DkZhhUhd.js.map +1 -0
- package/dist/esm/chunks/{browser-http-transport-DL8bkNdg.js → browser-http-transport-4rJkHcQu.js} +2 -2
- package/dist/esm/chunks/browser-http-transport-4rJkHcQu.js.map +1 -0
- package/dist/esm/chunks/error-Dc-SRSJK.js +2 -0
- package/dist/esm/chunks/error-Dc-SRSJK.js.map +1 -0
- package/dist/esm/chunks/index-jH0UMhh-.js +2 -0
- package/dist/esm/chunks/index-jH0UMhh-.js.map +1 -0
- package/dist/esm/chunks/memory-http-transport-CA1WxWBp.js +2 -0
- package/dist/esm/chunks/memory-http-transport-CA1WxWBp.js.map +1 -0
- package/dist/esm/chunks/node-http-transport-DPa2lK3T.js +2 -0
- package/dist/esm/chunks/node-http-transport-DPa2lK3T.js.map +1 -0
- package/dist/esm/chunks/progress-BZobfl7p.js +2 -0
- package/dist/esm/chunks/{progress-NePjO3Kd.js.map → progress-BZobfl7p.js.map} +1 -1
- package/dist/esm/chunks/repository-DF6ePd1x.js +2 -0
- package/dist/esm/chunks/repository-DF6ePd1x.js.map +1 -0
- package/dist/esm/chunks/walk-submodules-Dq9oGwP8.js +2 -0
- package/dist/esm/chunks/walk-submodules-Dq9oGwP8.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.js.map +1 -1
- package/dist/esm/index.node.js +1 -1
- package/dist/esm/index.node.js.map +1 -1
- package/dist/esm/primitives/index.js +1 -1
- package/dist/esm/primitives/index.js.map +1 -1
- package/dist/types/adapters/browser/index.d.cts +5 -2
- package/dist/types/adapters/browser/index.d.ts +5 -2
- package/dist/types/adapters/memory/index.d.cts +17 -2
- package/dist/types/adapters/memory/index.d.ts +17 -2
- package/dist/types/adapters/node/index.d.cts +5 -2
- package/dist/types/adapters/node/index.d.ts +5 -2
- package/dist/types/chunks/{context-BORy7yXb.d.ts → context-CCL0_F8R.d.ts} +65 -39
- package/dist/types/chunks/{context-CMrHCVwK.d.cts → context-YDw6qicq.d.cts} +65 -39
- package/dist/types/chunks/{http-transport-DirKfK2S.d.cts → http-transport--_NdQOiw.d.cts} +1 -1
- package/dist/types/chunks/{http-transport-DirKfK2S.d.ts → http-transport--_NdQOiw.d.ts} +1 -1
- package/dist/types/chunks/index-entry-DtEbVpOG.d.cts +47 -0
- package/dist/types/chunks/index-entry-UD4dvtKh.d.ts +47 -0
- package/dist/types/chunks/progress-7KKiXXfX.d.ts +405 -0
- package/dist/types/chunks/progress-By8yFaUE.d.cts +405 -0
- package/dist/types/chunks/{reflog-entry-C2Hsdobk.d.ts → reflog-entry-BbNnXCTC.d.cts} +17 -3
- package/dist/types/chunks/{reflog-entry-DNvSz7S5.d.cts → reflog-entry-CSzjnZd4.d.ts} +17 -3
- package/dist/types/chunks/{repository-DCR_3RVt.d.cts → repository-BeifCqp0.d.cts} +48 -8
- package/dist/types/chunks/{repository-DFxFeYi3.d.ts → repository-FoS_Laoy.d.ts} +48 -8
- package/dist/types/chunks/{write-tree-CuhpWKFo.d.cts → write-tree-C3oNxOlX.d.cts} +78 -46
- package/dist/types/chunks/{write-tree-Dn1LtIh7.d.ts → write-tree-DRI-LzSr.d.ts} +78 -46
- package/dist/types/commands/index.d.cts +826 -95
- package/dist/types/commands/index.d.ts +826 -95
- package/dist/types/index.browser.d.cts +7 -6
- package/dist/types/index.browser.d.ts +7 -6
- package/dist/types/index.d.cts +278 -53
- package/dist/types/index.d.ts +278 -53
- package/dist/types/index.default.d.cts +7 -6
- package/dist/types/index.default.d.ts +7 -6
- package/dist/types/index.node.d.cts +7 -6
- package/dist/types/index.node.d.ts +7 -6
- package/dist/types/primitives/index.d.cts +260 -12
- package/dist/types/primitives/index.d.ts +260 -12
- package/dist/types/transport/index.d.cts +1 -1
- package/dist/types/transport/index.d.ts +1 -1
- package/package.json +25 -18
- package/dist/cjs/chunks/browser-http-transport-D4NH-8oJ.cjs.map +0 -1
- package/dist/cjs/chunks/error-CDLOBdNU.cjs +0 -2
- package/dist/cjs/chunks/error-CDLOBdNU.cjs.map +0 -1
- package/dist/cjs/chunks/index-BVArBKuk.cjs +0 -2
- package/dist/cjs/chunks/index-BVArBKuk.cjs.map +0 -1
- package/dist/cjs/chunks/index-DE9HSiWf.cjs +0 -2
- package/dist/cjs/chunks/index-DE9HSiWf.cjs.map +0 -1
- package/dist/cjs/chunks/logger-CVG0zcPH.cjs +0 -2
- package/dist/cjs/chunks/logger-CVG0zcPH.cjs.map +0 -1
- package/dist/cjs/chunks/memory-http-transport-DXwDGKtR.cjs +0 -2
- package/dist/cjs/chunks/memory-http-transport-DXwDGKtR.cjs.map +0 -1
- package/dist/cjs/chunks/node-http-transport-vrbnNEDb.cjs +0 -2
- package/dist/cjs/chunks/node-http-transport-vrbnNEDb.cjs.map +0 -1
- package/dist/cjs/chunks/repository-BJwTSiGf.cjs +0 -2
- package/dist/cjs/chunks/repository-BJwTSiGf.cjs.map +0 -1
- package/dist/esm/chunks/browser-http-transport-DL8bkNdg.js.map +0 -1
- package/dist/esm/chunks/error-MOmSzp9Z.js +0 -2
- package/dist/esm/chunks/error-MOmSzp9Z.js.map +0 -1
- package/dist/esm/chunks/index-BjmofbKE.js +0 -2
- package/dist/esm/chunks/index-BjmofbKE.js.map +0 -1
- package/dist/esm/chunks/index-Jh5R-UmU.js +0 -2
- package/dist/esm/chunks/index-Jh5R-UmU.js.map +0 -1
- package/dist/esm/chunks/logger-DP2cCpvL.js +0 -2
- package/dist/esm/chunks/logger-DP2cCpvL.js.map +0 -1
- package/dist/esm/chunks/memory-http-transport-COJU6VOL.js +0 -2
- package/dist/esm/chunks/memory-http-transport-COJU6VOL.js.map +0 -1
- package/dist/esm/chunks/node-http-transport-DYCFIJbc.js +0 -2
- package/dist/esm/chunks/node-http-transport-DYCFIJbc.js.map +0 -1
- package/dist/esm/chunks/progress-NePjO3Kd.js +0 -2
- package/dist/esm/chunks/repository-Cs-dbHqO.js +0 -2
- package/dist/esm/chunks/repository-Cs-dbHqO.js.map +0 -1
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { G as GitIndex, I as IndexEntry } from '../chunks/
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
import {
|
|
1
|
+
import { G as GitIndex, I as IndexEntry } from '../chunks/index-entry-UD4dvtKh.js';
|
|
2
|
+
import { c as FilePath, O as ObjectId, b as Context, j as RefName } from '../chunks/context-CCL0_F8R.js';
|
|
3
|
+
import { F as FileMode, b as ConfigScope, c as ConfigKey, A as AuthorIdentity, R as ReflogEntry } from '../chunks/reflog-entry-CSzjnZd4.js';
|
|
4
|
+
export { C as CatFileBatchEntry, d as CatFileBatchOptions, e as CreateCommitInput, D as DiffTreesInput, f as DiffTreesOptions, M as MAX_COMMIT_MESSAGE_BYTES, g as MAX_GITIGNORE_BYTES, h as MAX_GITMODULES_BYTES, i as MAX_HAVES, j as MAX_INDEX_BYTES, k as MAX_PEEL_DEPTH, l as MAX_PUSH_OBJECTS, m as MAX_REFLOG_BYTES, n as MAX_SUBMODULE_DEPTH, o as MAX_SYMBOLIC_REF_DEPTH, p as MAX_WALK_QUEUE_SIZE, q as MAX_WALK_SEEDS, r as MAX_WORKING_TREE_BLOB_BYTES, s as ReadObjectOptions, t as ResolveRefOptions, S as SubmoduleEntry, T as TreeDiff, U as UpdateRefOptions, W as WalkCommitsOptions, u as WalkIgnorePredicate, v as WalkSubmodulesOptions, w as WalkTreeEntry, x as WalkTreeOptions, y as WalkWorkingTreeEntry, z as WalkWorkingTreeOptions } from '../chunks/reflog-entry-CSzjnZd4.js';
|
|
5
|
+
export { H as HashBlobOptions, z as HookInput, I as IsIgnoredMatch, A as IsIgnoredMatchSource, B as IsIgnoredQuery, S as SetEntryFlagsOptions, C as StageEntryOptions, D as StageEntrySource, U as UnstageEntryOptions, c as catFileBatch, a as createCommit, d as diffTrees, g as getRepoRoot, h as hashBlob, i as isIgnored, m as mergeBase, r as readBlob, b as readIndex, e as readObject, f as readTree, j as recordRefUpdate, k as resolveRef, l as runHook, s as setEntryFlags, E as sparseCheckoutPath, n as stageEntry, u as unstageEntry, o as updateRef, w as walkCommits, p as walkSubmodules, q as walkTree, t as walkWorkingTree, v as writeObject, x as writeSymbolicRef, y as writeTree } from '../chunks/write-tree-DRI-LzSr.js';
|
|
6
|
+
import { H as HttpTransport } from '../chunks/http-transport--_NdQOiw.js';
|
|
7
|
+
|
|
8
|
+
interface FlatTreeEntry {
|
|
9
|
+
readonly id: ObjectId;
|
|
10
|
+
readonly mode: FileMode;
|
|
11
|
+
}
|
|
12
|
+
interface FlatTree {
|
|
13
|
+
readonly entries: ReadonlyMap<FilePath, FlatTreeEntry>;
|
|
14
|
+
}
|
|
7
15
|
|
|
8
16
|
/** `true` ⇒ the path is in the sparse set (materialise it). */
|
|
9
17
|
type SparseMatcher = (path: FilePath) => boolean;
|
|
@@ -107,6 +115,22 @@ interface BuildPackResult {
|
|
|
107
115
|
}
|
|
108
116
|
declare const buildPack: (ctx: Context, input: BuildPackInput) => Promise<BuildPackResult>;
|
|
109
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Single source of truth for "is this index entry dirty in the working tree?".
|
|
120
|
+
*
|
|
121
|
+
* Compares the working file at `entry.path` against the entry's `(id, mode)`:
|
|
122
|
+
* `absent` when no working file exists, `modified` when the derived working
|
|
123
|
+
* mode or the content hash differs, else `unchanged`. Content is hashed via the
|
|
124
|
+
* uncapped `serializeAndHash` core (never the size-capped `hashBlob` write path),
|
|
125
|
+
* so a read-only comparison never throws on a large working file. Symlink
|
|
126
|
+
* content is its target (`readlink`), not the followed file.
|
|
127
|
+
*
|
|
128
|
+
* Consumed by `status` (reporting) and `rm` (the local-modification valve).
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
type WorkingTreeComparison = 'absent' | 'unchanged' | 'modified';
|
|
132
|
+
declare const compareWorkingTreeEntry: (ctx: Context, entry: IndexEntry) => Promise<WorkingTreeComparison>;
|
|
133
|
+
|
|
110
134
|
/**
|
|
111
135
|
* Subset of `.git/config` that v1 commands consume. Only fields actually used by
|
|
112
136
|
* commands are typed — the parser ignores everything else (lenient, like git itself).
|
|
@@ -126,6 +150,8 @@ interface ParsedConfig {
|
|
|
126
150
|
};
|
|
127
151
|
readonly remote?: ReadonlyMap<string, {
|
|
128
152
|
readonly url?: string;
|
|
153
|
+
/** `remote.<name>.pushurl` — push-only URL; `push` reads `pushUrl ?? url`. */
|
|
154
|
+
readonly pushUrl?: string;
|
|
129
155
|
readonly fetch?: ReadonlyArray<string>;
|
|
130
156
|
/** `remote.<name>.promisor` — true when this is a partial-clone promisor remote. */
|
|
131
157
|
readonly promisor?: boolean;
|
|
@@ -156,6 +182,98 @@ declare const readConfig: (ctx: Context) => Promise<ParsedConfig>;
|
|
|
156
182
|
* stale parse.
|
|
157
183
|
*/
|
|
158
184
|
declare const invalidateConfigCache: (ctx: Context) => void;
|
|
185
|
+
/**
|
|
186
|
+
* One `[section "subsection"]` block of a git-config-format INI file: the
|
|
187
|
+
* section name, an optional quoted subsection, and its key/value entries.
|
|
188
|
+
* Exported so `.gitmodules` parsing — byte-identical grammar — reuses one
|
|
189
|
+
* tokenizer (ADR-086).
|
|
190
|
+
*/
|
|
191
|
+
interface IniSection {
|
|
192
|
+
readonly section: string;
|
|
193
|
+
readonly subsection: string | undefined;
|
|
194
|
+
readonly entries: ReadonlyArray<{
|
|
195
|
+
readonly key: string;
|
|
196
|
+
readonly value: string;
|
|
197
|
+
}>;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Tokenize git-config-format INI text into its sections. Lenient, like git:
|
|
201
|
+
* orphan and malformed lines are skipped; comments and backslash
|
|
202
|
+
* continuations are honored.
|
|
203
|
+
*/
|
|
204
|
+
declare const parseIniSections: (text: string) => ReadonlyArray<IniSection>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Drop the per-scope sections cache for a single `Context`. Called by
|
|
208
|
+
* `invalidateConfigCache` in `config-read.ts` so writers can invalidate both
|
|
209
|
+
* caches atomically.
|
|
210
|
+
*/
|
|
211
|
+
declare const invalidateScopedConfigCache: (ctx: Context) => void;
|
|
212
|
+
/**
|
|
213
|
+
* Read the raw IniSection array for a single config scope, or a scope-tagged
|
|
214
|
+
* flat array merged in precedence order (`system → global → local → worktree`)
|
|
215
|
+
* when `scope` is omitted.
|
|
216
|
+
*
|
|
217
|
+
* Per-Context, per-scope cached: a second call with the same `(ctx, scope)`
|
|
218
|
+
* shares the in-flight promise of the first. `invalidateConfigCache(ctx)` (from
|
|
219
|
+
* `config-read.ts`) drops the cached entries here too.
|
|
220
|
+
*
|
|
221
|
+
* In the merged-read path (`scope` omitted), scopes that are unavailable on
|
|
222
|
+
* the current adapter (`CONFIG_SCOPE_NOT_AVAILABLE`, `CONFIG_SYSTEM_PATH_UNRESOLVED`)
|
|
223
|
+
* are silently skipped — the caller gets whatever scopes the adapter can
|
|
224
|
+
* actually surface. Single-scope calls raise instead, so the caller can react
|
|
225
|
+
* to a missing scope explicitly.
|
|
226
|
+
*/
|
|
227
|
+
declare const readConfigSections: ({ ctx, scope, }: {
|
|
228
|
+
readonly ctx: Context;
|
|
229
|
+
readonly scope?: ConfigScope;
|
|
230
|
+
}) => Promise<ReadonlyArray<{
|
|
231
|
+
readonly scope: ConfigScope;
|
|
232
|
+
readonly section: IniSection;
|
|
233
|
+
}>>;
|
|
234
|
+
/**
|
|
235
|
+
* Look up a single value for a fully-qualified key (`section.name` or
|
|
236
|
+
* `section.subsection.name`). Behaviour:
|
|
237
|
+
*
|
|
238
|
+
* - When `scope` is provided, reads only that scope. If the key has more than
|
|
239
|
+
* one match in that scope, throws `CONFIG_MULTIPLE_VALUES` (carries `scope`).
|
|
240
|
+
* - When `scope` is omitted, merges across the four scopes. Same multi-value
|
|
241
|
+
* throw if more than one entry matches anywhere across the merged view
|
|
242
|
+
* (without the `scope` discriminator).
|
|
243
|
+
* - Absent key: returns `{ key, value: undefined }`; never throws.
|
|
244
|
+
*
|
|
245
|
+
* Branding: the returned `key` is the caller's input cast to `ConfigKey`;
|
|
246
|
+
* `parseConfigKey` validates the string before this cast, so the brand is
|
|
247
|
+
* load-bearing only at the type level.
|
|
248
|
+
*/
|
|
249
|
+
declare const getConfigValue: ({ ctx, key, scope, }: {
|
|
250
|
+
readonly ctx: Context;
|
|
251
|
+
readonly key: string;
|
|
252
|
+
readonly scope?: ConfigScope;
|
|
253
|
+
}) => Promise<{
|
|
254
|
+
readonly key: ConfigKey;
|
|
255
|
+
readonly value: string;
|
|
256
|
+
readonly scope: ConfigScope;
|
|
257
|
+
} | {
|
|
258
|
+
readonly key: ConfigKey;
|
|
259
|
+
readonly value: undefined;
|
|
260
|
+
}>;
|
|
261
|
+
/**
|
|
262
|
+
* Look up every value for a key. Returns matches in scope-precedence order
|
|
263
|
+
* (and physical-file order within each scope). Empty array when the key is
|
|
264
|
+
* absent. Never throws on multi-value.
|
|
265
|
+
*/
|
|
266
|
+
declare const getAllConfigValues: ({ ctx, key, scope, }: {
|
|
267
|
+
readonly ctx: Context;
|
|
268
|
+
readonly key: string;
|
|
269
|
+
readonly scope?: ConfigScope;
|
|
270
|
+
}) => Promise<{
|
|
271
|
+
readonly key: ConfigKey;
|
|
272
|
+
readonly values: ReadonlyArray<{
|
|
273
|
+
readonly value: string;
|
|
274
|
+
readonly scope: ConfigScope;
|
|
275
|
+
}>;
|
|
276
|
+
}>;
|
|
159
277
|
|
|
160
278
|
interface EnumeratePushObjectsInput {
|
|
161
279
|
/**
|
|
@@ -221,6 +339,21 @@ interface FetchPackResult {
|
|
|
221
339
|
}
|
|
222
340
|
declare const fetchPack: (ctx: Context, transport: HttpTransport, input: FetchPackInput) => Promise<FetchPackResult>;
|
|
223
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Flatten a nested `Tree` object into the `FlatTree` shape that the
|
|
344
|
+
* `mergeTrees` domain primitive consumes.
|
|
345
|
+
*
|
|
346
|
+
* Bridges `walkTree`'s iterator into the `FlatTree` Map of
|
|
347
|
+
* `path → { id, mode }`. Consumed by `merge.ts`'s clean-merge tree walk
|
|
348
|
+
* and by `rm`'s HEAD-vs-index staged-change check (the safety valve), so
|
|
349
|
+
* it is exported from the primitives barrel.
|
|
350
|
+
*
|
|
351
|
+
* Pure with respect to the working tree — only reads git objects via
|
|
352
|
+
* `walkTree`.
|
|
353
|
+
*/
|
|
354
|
+
|
|
355
|
+
declare const flattenTree: (ctx: Context, treeId: ObjectId) => Promise<FlatTree>;
|
|
356
|
+
|
|
224
357
|
/**
|
|
225
358
|
* Compose `walkTree → computeChangeset → applyChangeset` to update the
|
|
226
359
|
* working tree to a target tree's contents.
|
|
@@ -393,6 +526,18 @@ declare const updateShallow: (ctx: Context, updates: ShallowUpdate) => Promise<v
|
|
|
393
526
|
*/
|
|
394
527
|
declare const synthesizeTreeFromIndex: (ctx: Context, entries: ReadonlyArray<IndexEntry>) => Promise<ObjectId>;
|
|
395
528
|
|
|
529
|
+
/**
|
|
530
|
+
* Targeted `.git/config` writer (ADR-082). tsgit has no general INI writer;
|
|
531
|
+
* this performs line surgery that preserves comments, blank lines, key order,
|
|
532
|
+
* casing of unrelated keys, and every other section byte-for-byte. It writes
|
|
533
|
+
* one `key = value` per call under any `[section]` / `[section "subsection"]`.
|
|
534
|
+
*
|
|
535
|
+
* @writes
|
|
536
|
+
* surface: config
|
|
537
|
+
* kind: readback-only
|
|
538
|
+
* format: git-config-text
|
|
539
|
+
*/
|
|
540
|
+
|
|
396
541
|
/**
|
|
397
542
|
* Set `key` under `[section]` / `[section "subsection"]`, preserving every
|
|
398
543
|
* other byte verbatim.
|
|
@@ -402,9 +547,9 @@ declare const synthesizeTreeFromIndex: (ctx: Context, entries: ReadonlyArray<Ind
|
|
|
402
547
|
* inserted right after the header;
|
|
403
548
|
* - no such section ⇒ `[section]\n\t<key> = <value>\n` is appended.
|
|
404
549
|
*/
|
|
405
|
-
declare const
|
|
406
|
-
/** `
|
|
407
|
-
declare const
|
|
550
|
+
declare const setConfigEntryInText: (text: string, section: string, subsection: string | undefined, key: string, value: string) => string;
|
|
551
|
+
/** `setConfigEntryInText` bound to the `[core]` section — kept for legacy callers. */
|
|
552
|
+
declare const setCoreConfigEntryInText: (text: string, key: string, value: string) => string;
|
|
408
553
|
/** One `key = value` write under `[section]` / `[section "subsection"]`. */
|
|
409
554
|
interface ConfigEntry {
|
|
410
555
|
readonly section: string;
|
|
@@ -414,12 +559,115 @@ interface ConfigEntry {
|
|
|
414
559
|
}
|
|
415
560
|
/**
|
|
416
561
|
* Read `${gitDir}/config` (a missing file is treated as `''`), fold
|
|
417
|
-
* `
|
|
562
|
+
* `setConfigEntryInText` over `entries`, write the result, and invalidate the
|
|
418
563
|
* per-`Context` `readConfig` cache so a later read sees the new values.
|
|
419
564
|
*/
|
|
420
565
|
declare const updateConfigEntries: (ctx: Context, entries: ReadonlyArray<ConfigEntry>) => Promise<void>;
|
|
421
566
|
/** Fold a batch of `[core]` `key = value` writes via `updateConfigEntries`. */
|
|
422
567
|
declare const updateCoreConfig: (ctx: Context, entries: Record<string, string>) => Promise<void>;
|
|
568
|
+
/**
|
|
569
|
+
* Mixed-operation batch entry. Folded over the on-disk text in order in
|
|
570
|
+
* a single `writeUtf8`. Use this when `remote` CRUD needs a section-
|
|
571
|
+
* remove paired with branch-referrer key removals in one atomic write.
|
|
572
|
+
*/
|
|
573
|
+
type ConfigOperation = {
|
|
574
|
+
readonly kind: 'set';
|
|
575
|
+
readonly section: string;
|
|
576
|
+
readonly subsection?: string;
|
|
577
|
+
readonly key: string;
|
|
578
|
+
readonly value: string;
|
|
579
|
+
} | {
|
|
580
|
+
/**
|
|
581
|
+
* Insert a fresh `key = value` line after the section header WITHOUT
|
|
582
|
+
* replacing any existing entry with the same key. Use for multi-value
|
|
583
|
+
* keys (`fetch`) where every call must yield an additional line.
|
|
584
|
+
*/
|
|
585
|
+
readonly kind: 'appendEntry';
|
|
586
|
+
readonly section: string;
|
|
587
|
+
readonly subsection?: string;
|
|
588
|
+
readonly key: string;
|
|
589
|
+
readonly value: string;
|
|
590
|
+
} | {
|
|
591
|
+
readonly kind: 'removeEntry';
|
|
592
|
+
readonly section: string;
|
|
593
|
+
readonly subsection?: string;
|
|
594
|
+
readonly key: string;
|
|
595
|
+
} | {
|
|
596
|
+
readonly kind: 'removeSection';
|
|
597
|
+
readonly section: string;
|
|
598
|
+
readonly subsection?: string;
|
|
599
|
+
} | {
|
|
600
|
+
readonly kind: 'renameSection';
|
|
601
|
+
readonly section: string;
|
|
602
|
+
readonly from: string;
|
|
603
|
+
readonly to: string;
|
|
604
|
+
};
|
|
605
|
+
declare const applyConfigOpInText: (text: string, op: ConfigOperation) => string;
|
|
606
|
+
/**
|
|
607
|
+
* Write a single `key = value` entry into the config file for the given scope
|
|
608
|
+
* (default `'local'`). Re-runs of the same call with a different value
|
|
609
|
+
* overwrite the existing entry in place (preserving comments and surrounding
|
|
610
|
+
* content). The key is validated via `parseConfigKey` (throws
|
|
611
|
+
* `CONFIG_KEY_INVALID` on a malformed input) and the value is validated by
|
|
612
|
+
* `assertValueSafe` (throws `CONFIG_VALUE_INVALID` on a banned control char)
|
|
613
|
+
* BEFORE any I/O — a rejected input never touches the file system.
|
|
614
|
+
*
|
|
615
|
+
* The branding on `ConfigKey` is enforced at the type level; this primitive
|
|
616
|
+
* accepts a raw string and parses it internally so it can be used directly
|
|
617
|
+
* from porcelain wrappers that hold un-branded callers' input.
|
|
618
|
+
*/
|
|
619
|
+
declare const setConfigEntry: ({ ctx, key, value, scope, }: {
|
|
620
|
+
readonly ctx: Context;
|
|
621
|
+
readonly key: string;
|
|
622
|
+
readonly value: string;
|
|
623
|
+
readonly scope?: ConfigScope;
|
|
624
|
+
}) => Promise<void>;
|
|
625
|
+
/**
|
|
626
|
+
* Remove a single `key = value` entry from the given scope. Idempotent — if
|
|
627
|
+
* the key is absent the call is a no-op (no I/O). If the key appears more
|
|
628
|
+
* than once in the targeted scope, throws `CONFIG_MULTIPLE_VALUES` with
|
|
629
|
+
* `requested: 'remove'` (the caller should use `unsetAllConfigEntries` to
|
|
630
|
+
* clear every occurrence).
|
|
631
|
+
*/
|
|
632
|
+
declare const unsetConfigEntry: ({ ctx, key, scope, }: {
|
|
633
|
+
readonly ctx: Context;
|
|
634
|
+
readonly key: string;
|
|
635
|
+
readonly scope?: ConfigScope;
|
|
636
|
+
}) => Promise<void>;
|
|
637
|
+
/**
|
|
638
|
+
* Remove every occurrence of `key` from the targeted scope. Idempotent — a
|
|
639
|
+
* missing key produces no I/O. Unlike `unsetConfigEntry`, multi-valued keys
|
|
640
|
+
* are explicitly supported: all matching lines are removed in a single
|
|
641
|
+
* read-modify-write pass.
|
|
642
|
+
*/
|
|
643
|
+
declare const unsetAllConfigEntries: ({ ctx, key, scope, }: {
|
|
644
|
+
readonly ctx: Context;
|
|
645
|
+
readonly key: string;
|
|
646
|
+
readonly scope?: ConfigScope;
|
|
647
|
+
}) => Promise<void>;
|
|
648
|
+
/**
|
|
649
|
+
* Rename `[<section> "<oldSubsection>"]` to `[<section> "<newSubsection>"]`.
|
|
650
|
+
* Both inputs are dotted (`'remote.origin'`). The two section families MUST
|
|
651
|
+
* match — renaming across families (e.g. `remote.origin` → `branch.main`) is
|
|
652
|
+
* rejected with `INVALID_OPTION`. Throws `CONFIG_SECTION_NOT_FOUND` if the
|
|
653
|
+
* source section does not exist in the targeted scope.
|
|
654
|
+
*/
|
|
655
|
+
declare const renameConfigSection: ({ ctx, oldName, newName, scope, }: {
|
|
656
|
+
readonly ctx: Context;
|
|
657
|
+
readonly oldName: string;
|
|
658
|
+
readonly newName: string;
|
|
659
|
+
readonly scope?: ConfigScope;
|
|
660
|
+
}) => Promise<void>;
|
|
661
|
+
/**
|
|
662
|
+
* Delete `[<section> "<subsection>"]` and its body. `sectionName` is dotted
|
|
663
|
+
* (`'remote.origin'`). Throws `CONFIG_SECTION_NOT_FOUND` when the section is
|
|
664
|
+
* absent in the targeted scope.
|
|
665
|
+
*/
|
|
666
|
+
declare const removeConfigSection: ({ ctx, sectionName, scope, }: {
|
|
667
|
+
readonly ctx: Context;
|
|
668
|
+
readonly sectionName: string;
|
|
669
|
+
readonly scope?: ConfigScope;
|
|
670
|
+
}) => Promise<void>;
|
|
423
671
|
|
|
424
672
|
/**
|
|
425
673
|
* Write the `.git/info/sparse-checkout` pattern file. The command tier
|
|
@@ -440,5 +688,5 @@ declare const updateCoreConfig: (ctx: Context, entries: Record<string, string>)
|
|
|
440
688
|
*/
|
|
441
689
|
declare const writeSparsePatternText: (ctx: Context, text: string) => Promise<void>;
|
|
442
690
|
|
|
443
|
-
export { MAX_SPARSE_PATTERN_FILE_BYTES, appendReflog, applyChangeset, buildIndexFromTree, buildPack, computeChangeset, deleteReflog, enumeratePushObjects, enumerateRefs, fetchPack, invalidateConfigCache, isWorkingTreeDirty, listReflogs, loadSparseMatcher, materializeTree, readConfig, readReflog, readShallow, readSparsePatternText, reflogExists, resolveReflogIdentity, setConfigEntry,
|
|
444
|
-
export type { ApplyChangesetOpts, ApplyChangesetResult, BuildIndexFromTreeOpts, BuildPackInput, BuildPackResult, Changeset, ChangesetEntry, ChangesetStats, ConfigEntry, EnumeratePushObjectsInput, FetchPackInput, FetchPackResult, MaterializeTreeOpts, MaterializeTreeResult, ParsedConfig };
|
|
691
|
+
export { MAX_SPARSE_PATTERN_FILE_BYTES, appendReflog, applyChangeset, applyConfigOpInText, buildIndexFromTree, buildPack, compareWorkingTreeEntry, computeChangeset, deleteReflog, enumeratePushObjects, enumerateRefs, fetchPack, flattenTree, getAllConfigValues, getConfigValue, invalidateConfigCache, invalidateScopedConfigCache, isWorkingTreeDirty, listReflogs, loadSparseMatcher, materializeTree, parseIniSections, readConfig, readConfigSections, readReflog, readShallow, readSparsePatternText, reflogExists, removeConfigSection, renameConfigSection, resolveReflogIdentity, setConfigEntry, setConfigEntryInText, setCoreConfigEntryInText, synthesizeTreeFromIndex, unsetAllConfigEntries, unsetConfigEntry, updateConfigEntries, updateCoreConfig, updateShallow, writeReflog, writeSparsePatternText };
|
|
692
|
+
export type { ApplyChangesetOpts, ApplyChangesetResult, BuildIndexFromTreeOpts, BuildPackInput, BuildPackResult, Changeset, ChangesetEntry, ChangesetStats, ConfigEntry, EnumeratePushObjectsInput, FetchPackInput, FetchPackResult, IniSection, MaterializeTreeOpts, MaterializeTreeResult, ParsedConfig, WorkingTreeComparison };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as HttpRequest, b as HttpResponse, H as HttpTransport } from '../chunks/http-transport--_NdQOiw.cjs';
|
|
2
2
|
|
|
3
3
|
type RetryPredicate = (info: {
|
|
4
4
|
readonly error?: unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as HttpRequest, b as HttpResponse, H as HttpTransport } from '../chunks/http-transport--_NdQOiw.js';
|
|
2
2
|
|
|
3
3
|
type RetryPredicate = (info: {
|
|
4
4
|
readonly error?: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scolladon/tsgit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Lightning-fast git, pure TypeScript, everywhere.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -209,6 +209,7 @@
|
|
|
209
209
|
"check:architecture": "wireit",
|
|
210
210
|
"check:spelling": "wireit",
|
|
211
211
|
"validate": "wireit",
|
|
212
|
+
"prepush": "wireit",
|
|
212
213
|
"upgrade": "npm update && npm install && npm run validate"
|
|
213
214
|
},
|
|
214
215
|
"wireit": {
|
|
@@ -288,7 +289,7 @@
|
|
|
288
289
|
"output": []
|
|
289
290
|
},
|
|
290
291
|
"check:deps": {
|
|
291
|
-
"command": "npm outdated",
|
|
292
|
+
"command": "sh -c 'npm outdated || ! npm outdated 2>/dev/null | tail -n +2 | grep -v \"^@ls-lint/ls-lint \" | grep -q .'",
|
|
292
293
|
"files": [
|
|
293
294
|
"package.json",
|
|
294
295
|
"package-lock.json"
|
|
@@ -704,7 +705,7 @@
|
|
|
704
705
|
"check:exports",
|
|
705
706
|
"check:security",
|
|
706
707
|
"check:doc-coverage",
|
|
707
|
-
"check:doc-
|
|
708
|
+
"check:doc-links",
|
|
708
709
|
"check:test-pyramid",
|
|
709
710
|
"check:parity-fixtures",
|
|
710
711
|
"check:browser-surface",
|
|
@@ -713,6 +714,12 @@
|
|
|
713
714
|
"test:integration",
|
|
714
715
|
"test:parity"
|
|
715
716
|
]
|
|
717
|
+
},
|
|
718
|
+
"prepush": {
|
|
719
|
+
"dependencies": [
|
|
720
|
+
"validate",
|
|
721
|
+
"check:doc-typedoc"
|
|
722
|
+
]
|
|
716
723
|
}
|
|
717
724
|
},
|
|
718
725
|
"lint-staged": {
|
|
@@ -722,12 +729,12 @@
|
|
|
722
729
|
]
|
|
723
730
|
},
|
|
724
731
|
"devDependencies": {
|
|
725
|
-
"@arethetypeswrong/cli": "0.18.
|
|
726
|
-
"@biomejs/biome": "2.4.
|
|
727
|
-
"@cloudflare/vitest-pool-workers": "0.16.
|
|
728
|
-
"@cloudflare/workers-types": "4.
|
|
729
|
-
"@commitlint/cli": "21.0.
|
|
730
|
-
"@commitlint/config-conventional": "21.0.
|
|
732
|
+
"@arethetypeswrong/cli": "0.18.3",
|
|
733
|
+
"@biomejs/biome": "2.4.16",
|
|
734
|
+
"@cloudflare/vitest-pool-workers": "0.16.11",
|
|
735
|
+
"@cloudflare/workers-types": "4.20260602.1",
|
|
736
|
+
"@commitlint/cli": "21.0.2",
|
|
737
|
+
"@commitlint/config-conventional": "21.0.2",
|
|
731
738
|
"@ls-lint/ls-lint": "2.3.1",
|
|
732
739
|
"@playwright/test": "1.60.0",
|
|
733
740
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
@@ -738,24 +745,24 @@
|
|
|
738
745
|
"@stryker-mutator/typescript-checker": "9.6.1",
|
|
739
746
|
"@stryker-mutator/vitest-runner": "9.6.1",
|
|
740
747
|
"@types/node": "25.9.1",
|
|
741
|
-
"@vitest/coverage-v8": "4.1.
|
|
742
|
-
"cspell": "10.0.
|
|
743
|
-
"dependency-cruiser": "17.4.
|
|
748
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
749
|
+
"cspell": "10.0.1",
|
|
750
|
+
"dependency-cruiser": "17.4.3",
|
|
744
751
|
"fast-check": "4.8.0",
|
|
745
752
|
"husky": "9.1.7",
|
|
746
|
-
"isomorphic-git": "1.38.
|
|
753
|
+
"isomorphic-git": "1.38.3",
|
|
747
754
|
"jscpd": "4.2.4",
|
|
748
|
-
"knip": "6.
|
|
749
|
-
"lint-staged": "17.0.
|
|
755
|
+
"knip": "6.15.0",
|
|
756
|
+
"lint-staged": "17.0.7",
|
|
750
757
|
"minimatch": "10.2.5",
|
|
751
|
-
"rollup": "4.
|
|
758
|
+
"rollup": "4.61.0",
|
|
752
759
|
"rollup-plugin-dts": "6.4.1",
|
|
753
760
|
"rollup-plugin-visualizer": "7.0.1",
|
|
754
761
|
"size-limit": "12.1.0",
|
|
755
762
|
"typedoc": "0.28.19",
|
|
756
763
|
"typescript": "6.0.3",
|
|
757
|
-
"vitest": "4.1.
|
|
764
|
+
"vitest": "4.1.8",
|
|
758
765
|
"wireit": "0.14.12",
|
|
759
|
-
"wrangler": "4.
|
|
766
|
+
"wrangler": "4.96.0"
|
|
760
767
|
}
|
|
761
768
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-http-transport-D4NH-8oJ.cjs","sources":["../../../src/adapters/browser/browser-file-system.ts","../../../src/adapters/browser/browser-hash-service.ts","../../../src/adapters/browser/browser-compressor.ts","../../../src/adapters/browser/browser-http-transport.ts"],"sourcesContent":[null,null,null,null],"names":["leafSegment","segments","path","leaf","length","undefined","fileNotFound","isFileNotFound","err","TsgitError","data","code","buildFileStat","size","timeMs","isFile","ctimeMs","mtimeMs","dev","ino","mode","uid","gid","isDirectory","isSymbolicLink","toHex","bytes","result","byte","toString","padStart","deflate","stream","Blob","pipeThrough","CompressionStream","Uint8Array","Response","arrayBuffer","compressFailed","Error","message","String","inflate","DecompressionStream","decompressFailed","streamInflate","offset","slice","subarray","end","attempt","output","bytesConsumed","createInflateStream","rootHandle","constructor","this","read","handle","resolveFileHandle","file","getFile","readSlice","permissionDenied","readUtf8","text","write","writable","createWritable","close","writeExclusive","splitPath","dir","walkToParent","assertDoesNotExist","getFileHandle","create","writeUtf8","content","TextEncoder","encode","appendUtf8","existing","keepExistingData","type","position","exists","resolveDirHandle","stat","lastModified","Date","now","lstat","readdir","entries","iterable","name","child","push","kind","mkdir","segment","getDirectoryHandle","rm","removeEntry","rename","src","dst","readlink","_path","unsupportedOperation","symlink","_target","chmod","_mode","rmRecursive","parent","catch","recursive","openWithNoFollow","replace","split","filter","s","i","join","fileExists","algorithm","digestLength","globalThis","crypto","subtle","hashFailed","hash","digest","algoName","hashHex","createHasher","chunks","consumed","finalize","async","total","reduce","sum","chunk","concatenated","set","update","digestHex","request","req","init","method","headers","body","signal","res","fetch","url","forEach","value","key","toLowerCase","ReadableStream","statusCode","status","networkError"],"mappings":"mDA0QA,SAASA,EAAYC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AAA,WAAW,8BAC/BM,EAAOxC,KAAKzF,EAAKsC,QACnB,EACAuF,OAAQM,EACRS,UAAWR,SAAYrH,QAAYoH,KAEvC,CAEA,YAAYL,GACV,MAA0B,SAAnB/E,KAAKuE,UAAuB,QAAU,SAC/C,sCEnDA,aAAMuB,CAAQC,GACZ,IACE,MAAMC,EAAoB,CACxBC,OAAQF,EAAIE,OACZC,QAAS,IAAKH,EAAIG,eAEHtJ,IAAbmJ,EAAII,OAAoBH,EAAKG,KAAOJ,EAAII,WACzBvJ,IAAfmJ,EAAIK,SAAsBJ,EAAKI,OAASL,EAAIK,QAChD,MAAMC,QAAYC,MAAMP,EAAIQ,IAAKP,GAC3BE,EAAkC,CAAA,EACxCG,EAAIH,QAAQM,QAAQ,CAACC,EAAOC,KAC1BR,EAAQQ,EAAIC,eAAiBF,IAE/B,MAAMN,EAAoCE,EAAIF,MAC5C,IAAIS,eACN,MAAO,CACLC,WAAYR,EAAIS,OAChBZ,UACAC,OAEJ,CAAE,MAAOpJ,GACP,MAAMgK,EAAAA,aAAahK,aAAegC,MAAQhC,EAAIiC,QAAUC,OAAOlC,GACjE,CACF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";class e extends Error{data;name="TsgitError";constructor(e){super(`${e.code}: ${function(e){switch(e.code){case"INVALID_OBJECT_ID":case"INVALID_FILE_MODE":return e.value;case"INVALID_OBJECT_HEADER":case"INVALID_TREE_ENTRY":case"INVALID_COMMIT":case"INVALID_TAG":case"INVALID_IDENTITY":case"INVALID_PACK_HEADER":case"INVALID_PACK_INDEX":case"INVALID_PACK_ENTRY":case"INVALID_DELTA":case"INVALID_REF":case"INVALID_PACKED_REFS":case"INVALID_INDEX_HEADER":case"INVALID_INDEX_ENTRY":return e.reason;case"FILE_NOT_FOUND":return`file not found: ${t(e.path)}`;case"FILE_EXISTS":return`file already exists: ${t(e.path)}`;case"NOT_A_DIRECTORY":return`not a directory: ${t(e.path)}`;case"DIRECTORY_NOT_EMPTY":return`directory not empty: ${t(e.path)}`;case"PERMISSION_DENIED":return`permission denied: ${t(e.path)}`;case"UNSUPPORTED_OPERATION":return`unsupported operation: ${e.operation}: ${e.reason}`;case"HASH_FAILED":return`hash computation failed: ${e.reason}`;case"COMPRESS_FAILED":return`compression failed: ${e.reason}`;case"DECOMPRESS_FAILED":return`decompression failed: ${e.reason}`;case"HTTP_ERROR":return`HTTP ${e.statusCode}: ${e.reason}`;case"NETWORK_ERROR":return`network error: ${e.reason}`;case"INVALID_TREE_FOR_DIFF":return`invalid tree for diff: ${e.reason}`;case"INVALID_DIFF_INPUT":return`invalid diff input: ${e.reason}`;case"INVALID_MERGE_TREE":return`invalid merge tree: ${e.reason}`;case"INVALID_MERGE_INPUT":return`invalid merge input: ${e.reason}`;case"OBJECT_NOT_FOUND":return`object not found: ${e.id}`;case"OBJECT_HASH_MISMATCH":return`object hash mismatch: expected=${e.expected} actual=${e.actual}`;case"UNEXPECTED_OBJECT_TYPE":return`unexpected object type: expected=${e.expected} actual=${e.actual} id=${e.id}`;case"TREE_CYCLE_DETECTED":return`tree cycle detected: ${e.id}`;case"TREE_DEPTH_EXCEEDED":return`tree depth exceeded: ${e.depth}`;case"TREE_ENTRY_LIMIT_EXCEEDED":return`tree entry limit exceeded: count=${e.count} limit=${e.limit}`;case"OBJECT_TOO_LARGE":return`object too large: id=${e.id} size=${e.actualSize} limit=${e.limit}`;case"DELTA_CHAIN_TOO_DEEP":return`delta chain too deep: ${e.depth}`;case"REF_NOT_FOUND":return`ref not found: ${e.name}`;case"REF_CHAIN_TOO_DEEP":return`ref chain too deep: depth=${e.depth} chain=${e.chain.join("->")}`;case"REF_CYCLE_DETECTED":return`ref cycle detected: ${e.chain.join("->")}`;case"REF_LOCKED":return`ref locked: ${e.name}`;case"REF_UPDATE_CONFLICT":return`ref update conflict: name=${e.name} expected=${e.expected} actual=${e.actual}`;case"INVALID_WALK_INPUT":return`invalid walk input: ${e.reason}`;case"OPERATION_ABORTED":return"operation aborted";case"INVALID_PKT_LENGTH":return`invalid pkt-line length: ${e.value}`;case"PKT_LENGTH_RESERVED":return`reserved pkt-line length: ${e.value}`;case"PKT_TOO_LARGE":return`pkt-line too large: ${e.value} bytes (max 65520)`;case"PKT_TRUNCATED":return`pkt-line truncated: ${e.remaining} bytes remaining`;case"INVALID_BASE_URL":return`invalid base URL: ${e.reason}`;case"MISSING_SERVICE_HEADER":return`missing service header: expected=${e.expected} actual=${e.actual}`;case"MISSING_CAPABILITIES":return"missing capabilities in advertisement";case"INVALID_REF_LINE":return`invalid ref line: ${e.line}`;case"DUPLICATE_REF":return`duplicate ref: ${e.name}`;case"INVALID_SIDEBAND_CHANNEL":return`invalid sideband channel: ${e.channel}`;case"SIDEBAND_FATAL":return`sideband fatal: ${e.message}`;case"UNKNOWN_ACK_STATUS":return`unknown ack status: ${e.value}`;case"INVALID_REPORT_STATUS":return`invalid report-status line: ${e.line}`;case"EMPTY_WANTS":return"upload-pack request has no wants";case"EMPTY_RECEIVE_UPDATES":return"receive-pack request has no updates";case"TOO_MANY_ADVERTISED_REFS":return`advertised refs (${e.count}) exceed limit ${e.limit}`;case"RESOURCE_LOCKED":return`${e.resource} locked: ${t(e.path)}`;case"PACK_TOO_LARGE":return`pack contains ${e.objectCount} objects, exceeds limit ${e.limit}`;case"NOT_A_REPOSITORY":return`not a git repository: ${t(e.path)}`;case"BARE_REPOSITORY":return`operation requires a working tree: ${e.operation}`;case"ALREADY_INITIALIZED":return`repository already exists: ${t(e.path)}`;case"WORKING_TREE_DIRTY":return`working tree has uncommitted changes: ${e.paths.length} files`;case"PATHSPEC_NO_MATCH":return`pathspec did not match any files: ${e.pattern}`;case"PATHSPEC_OUTSIDE_REPO":return`pathspec resolves outside repository: ${t(e.path)}`;case"NOTHING_TO_COMMIT":return"nothing to commit (use allowEmpty: true to commit anyway)";case"EMPTY_COMMIT_MESSAGE":return"commit message is empty (use allowEmptyMessage: true to commit anyway)";case"AUTHOR_UNCONFIGURED":return"author identity not configured (set ctx.config.user or pass author/committer)";case"BRANCH_EXISTS":return`branch already exists: ${e.name}`;case"BRANCH_NOT_FOUND":return`branch not found: ${e.name}`;case"TAG_EXISTS":return`tag already exists: ${e.name}`;case"TAG_NOT_FOUND":return`tag not found: ${e.name}`;case"CANNOT_DELETE_CHECKED_OUT_BRANCH":return`cannot delete branch currently checked out: ${e.name}`;case"INVALID_URL":return`invalid URL: ${e.reason}`;case"BLOCKED_HOST":return`host blocked: ${e.host} (${e.reason})`;case"TOO_MANY_REDIRECTS":return`too many redirects: ${e.count}`;case"UNSUPPORTED_SCHEME":return`unsupported URL scheme: ${e.scheme}`;case"TARGET_DIRECTORY_NOT_EMPTY":return`target directory is not empty: ${t(e.path)}`;case"REMOTE_ADVERTISES_NO_REFS":return"remote advertised no refs";case"NON_FAST_FORWARD":return`non-fast-forward update for ${e.ref}: local=${e.local} remote=${e.remote}`;case"PUSH_REJECTED":return`push rejected for ${e.ref}: ${e.reason}`;case"MERGE_HAS_CONFLICTS":return`merge has unresolved conflicts: ${e.count} files`;case"CHECKOUT_OVERWRITE_DIRTY":return`checkout would overwrite uncommitted changes: ${e.paths.length} files`;case"REVPARSE_AMBIGUOUS":return`revision expression "${e.expression}" is ambiguous (${e.candidates.length} candidates)`;case"REVPARSE_UNRESOLVED":return`cannot resolve revision: ${e.expression}`;case"EMPTY_PATHSPEC":return'pathspec is empty (use "." to mean "all paths")';case"OPERATION_IN_PROGRESS":return`${e.operation} in progress; complete or abort it before running this command`;case"MAX_REFSPECS_EXCEEDED":return`${e.count} refspecs exceeds limit ${e.limit}`;case"REMOTE_NOT_CONFIGURED":return`remote not configured: ${e.remote}`;case"NO_PROMISOR_REMOTE":return"no promisor remote configured; this repository is not a partial clone";case"REFSPEC_INVALID":return`invalid refspec "${e.raw}": ${e.reason}`;case"INVALID_OPTION":return`invalid option: ${e.option} — ${e.reason}`;case"REPOSITORY_DISPOSED":return"repository has been disposed; create a new one with openRepository()";case"ADAPTER_UNAVAILABLE":return`adapter unavailable for runtime ${e.runtime}: ${e.reason}`;case"WORKING_TREE_FILE_TOO_LARGE":return`working-tree file too large: ${t(e.path)} size=${e.size} limit=${e.limit}`;case"GITIGNORE_FILE_TOO_LARGE":return`.gitignore too large: ${t(e.path)} size=${e.size} limit=${e.limit}`;case"SPARSE_PATTERN_FILE_TOO_LARGE":return`sparse-checkout file too large: ${t(e.path)} size=${e.size} limit=${e.limit}`;case"INVALID_REFLOG_ENTRY":return`invalid reflog entry: ${e.reason}`;case"REFLOG_NOT_FOUND":return`reflog not found: ${e.ref}`;case"REFLOG_ENTRY_OUT_OF_RANGE":return`reflog entry out of range: ref=${e.ref} requested=${e.requested} available=${e.available}`;case"HOOK_FAILED":return`hook ${e.hook} failed with exit code ${e.exitCode}`;case"INVALID_FILTER_SPEC":return`invalid object filter "${e.spec}": ${e.reason}`;case"REMOTE_FILTER_UNSUPPORTED":return"remote does not support partial-clone object filtering";default:return String(e)}}(e)}`),this.data=e}}function t(e){const t=e.split(/[/\\]/);for(let e=t.length-1;e>=0;e--){const r=t[e];if(void 0!==r&&""!==r)return r}return e}const r=e=>{let t="";for(let r=0;r<e.length;r+=1){const o=e.charCodeAt(r);t+=9===o||10===o||o>=32&&o<=126?e[r]:`\\x${o.toString(16).toUpperCase().padStart(2,"0")}`}return t},o=r;exports.TsgitError=e,exports.adapterUnavailable=(t,o)=>new e({code:"ADAPTER_UNAVAILABLE",runtime:t,reason:r(o)}),exports.authorUnconfigured=()=>new e({code:"AUTHOR_UNCONFIGURED"}),exports.blockedHost=(t,o)=>new e({code:"BLOCKED_HOST",host:r(t),reason:r(o)}),exports.branchExists=t=>new e({code:"BRANCH_EXISTS",name:t}),exports.branchNotFound=t=>new e({code:"BRANCH_NOT_FOUND",name:t}),exports.cannotDeleteCheckedOutBranch=t=>new e({code:"CANNOT_DELETE_CHECKED_OUT_BRANCH",name:t}),exports.checkoutOverwriteDirty=t=>new e({code:"CHECKOUT_OVERWRITE_DIRTY",paths:t}),exports.compressFailed=t=>new e({code:"COMPRESS_FAILED",reason:t}),exports.decompressFailed=t=>new e({code:"DECOMPRESS_FAILED",reason:t}),exports.directoryNotEmpty=t=>new e({code:"DIRECTORY_NOT_EMPTY",path:t}),exports.emptyCommitMessage=()=>new e({code:"EMPTY_COMMIT_MESSAGE"}),exports.emptyPathspec=()=>new e({code:"EMPTY_PATHSPEC"}),exports.fileExists=t=>new e({code:"FILE_EXISTS",path:t}),exports.fileNotFound=t=>new e({code:"FILE_NOT_FOUND",path:t}),exports.gitignoreFileTooLarge=(t,r,o)=>new e({code:"GITIGNORE_FILE_TOO_LARGE",path:t,size:r,limit:o}),exports.hashFailed=t=>new e({code:"HASH_FAILED",reason:t}),exports.hookFailed=(t,o,n)=>new e({code:"HOOK_FAILED",hook:t,exitCode:o,stderr:r(n).slice(0,4096)}),exports.httpError=(t,r)=>new e({code:"HTTP_ERROR",statusCode:t,reason:r}),exports.invalidOption=(t,o)=>new e({code:"INVALID_OPTION",option:t,reason:r(o)}),exports.invalidUrl=t=>new e({code:"INVALID_URL",reason:t}),exports.invalidWalkInput=t=>new e({code:"INVALID_WALK_INPUT",reason:t}),exports.mergeHasConflicts=(t,r=[])=>{const o=r.length>100,n=o?r.slice(0,100):r;return new e(o?{code:"MERGE_HAS_CONFLICTS",count:t,paths:n,truncated:!0}:{code:"MERGE_HAS_CONFLICTS",count:t,paths:n})},exports.networkError=t=>new e({code:"NETWORK_ERROR",reason:t}),exports.noPromisorRemote=()=>new e({code:"NO_PROMISOR_REMOTE"}),exports.nonFastForward=(t,r,o)=>new e({code:"NON_FAST_FORWARD",ref:t,local:r,remote:o}),exports.notADirectory=t=>new e({code:"NOT_A_DIRECTORY",path:t}),exports.nothingToCommit=()=>new e({code:"NOTHING_TO_COMMIT"}),exports.operationAborted=()=>new e({code:"OPERATION_ABORTED"}),exports.operationInProgress=t=>new e({code:"OPERATION_IN_PROGRESS",operation:t}),exports.pathspecNoMatch=t=>new e({code:"PATHSPEC_NO_MATCH",pattern:t}),exports.pathspecOutsideRepo=t=>new e({code:"PATHSPEC_OUTSIDE_REPO",path:t}),exports.permissionDenied=t=>new e({code:"PERMISSION_DENIED",path:t}),exports.pushRejected=(t,r,o)=>new e({code:"PUSH_REJECTED",ref:t,reason:r,reportStatus:o}),exports.remoteAdvertisesNoRefs=()=>new e({code:"REMOTE_ADVERTISES_NO_REFS"}),exports.remoteNotConfigured=t=>new e({code:"REMOTE_NOT_CONFIGURED",remote:t}),exports.repositoryDisposed=()=>new e({code:"REPOSITORY_DISPOSED"}),exports.revparseUnresolved=t=>new e({code:"REVPARSE_UNRESOLVED",expression:t}),exports.sanitize=o,exports.sparsePatternFileTooLarge=(t,r,o)=>new e({code:"SPARSE_PATTERN_FILE_TOO_LARGE",path:t,size:r,limit:o}),exports.tagExists=t=>new e({code:"TAG_EXISTS",name:t}),exports.tagNotFound=t=>new e({code:"TAG_NOT_FOUND",name:t}),exports.targetDirectoryNotEmpty=t=>new e({code:"TARGET_DIRECTORY_NOT_EMPTY",path:t}),exports.unsupportedOperation=(t,r)=>new e({code:"UNSUPPORTED_OPERATION",operation:t,reason:r}),exports.unsupportedScheme=t=>new e({code:"UNSUPPORTED_SCHEME",scheme:t}),exports.workingTreeFileTooLarge=(t,r,o)=>new e({code:"WORKING_TREE_FILE_TOO_LARGE",path:t,size:r,limit:o});
|
|
2
|
-
//# sourceMappingURL=error-CDLOBdNU.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-CDLOBdNU.cjs","sources":["../../../src/domain/error.ts","../../../src/domain/commands/error.ts"],"sourcesContent":[null,null],"names":["TsgitError","Error","data","name","constructor","super","code","value","reason","basename","path","operation","statusCode","id","expected","actual","depth","count","limit","actualSize","chain","join","remaining","line","channel","message","resource","objectCount","paths","length","pattern","host","scheme","ref","local","remote","expression","candidates","raw","option","runtime","size","requested","available","hook","exitCode","spec","String","extractDetail","this","segments","split","i","segment","undefined","sanitizeForDisplay","s","out","charCodeAt","toString","toUpperCase","padStart","sanitize","st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