@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,5 +1,5 @@
|
|
|
1
|
-
import { b as Context, C as Compressor, I as InflateStreamResult,
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, F as FileSystem, d as FileStat, D as DirEntry, e as FileHandle, H as HashService, f as Hasher } from '../../chunks/context-YDw6qicq.cjs';
|
|
2
|
+
import { H as HttpTransport, a as HttpRequest, b as HttpResponse } from '../../chunks/http-transport--_NdQOiw.cjs';
|
|
3
3
|
|
|
4
4
|
interface BrowserAdapterOptions {
|
|
5
5
|
readonly rootHandle: FileSystemDirectoryHandle;
|
|
@@ -43,6 +43,9 @@ declare class BrowserFileSystem implements FileSystem {
|
|
|
43
43
|
chmod(path: string, _mode: number): Promise<void>;
|
|
44
44
|
rmRecursive(path: string): Promise<void>;
|
|
45
45
|
openWithNoFollow(_path: string, _mode: 'read' | 'write'): Promise<FileHandle>;
|
|
46
|
+
homedir(): string;
|
|
47
|
+
xdgConfigHome(): string;
|
|
48
|
+
systemConfigPath(): string;
|
|
46
49
|
private splitPath;
|
|
47
50
|
private resolveFileHandle;
|
|
48
51
|
private resolveDirHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Context, C as Compressor, I as InflateStreamResult,
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, F as FileSystem, d as FileStat, D as DirEntry, e as FileHandle, H as HashService, f as Hasher } from '../../chunks/context-CCL0_F8R.js';
|
|
2
|
+
import { H as HttpTransport, a as HttpRequest, b as HttpResponse } from '../../chunks/http-transport--_NdQOiw.js';
|
|
3
3
|
|
|
4
4
|
interface BrowserAdapterOptions {
|
|
5
5
|
readonly rootHandle: FileSystemDirectoryHandle;
|
|
@@ -43,6 +43,9 @@ declare class BrowserFileSystem implements FileSystem {
|
|
|
43
43
|
chmod(path: string, _mode: number): Promise<void>;
|
|
44
44
|
rmRecursive(path: string): Promise<void>;
|
|
45
45
|
openWithNoFollow(_path: string, _mode: 'read' | 'write'): Promise<FileHandle>;
|
|
46
|
+
homedir(): string;
|
|
47
|
+
xdgConfigHome(): string;
|
|
48
|
+
systemConfigPath(): string;
|
|
46
49
|
private splitPath;
|
|
47
50
|
private resolveFileHandle;
|
|
48
51
|
private resolveDirHandle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as HookRunner, b as Context, C as Compressor, I as InflateStreamResult, F as FileSystem, d as FileStat, D as DirEntry, e as FileHandle, H as HashService, f as Hasher, g as HookName, h as HookResult, i as HookRequest } from '../../chunks/context-YDw6qicq.cjs';
|
|
2
|
+
import { H as HttpTransport, a as HttpRequest, b as HttpResponse } from '../../chunks/http-transport--_NdQOiw.cjs';
|
|
3
3
|
|
|
4
4
|
interface MemoryAdapterOptions {
|
|
5
5
|
readonly files?: Readonly<Record<string, Uint8Array>>;
|
|
@@ -11,6 +11,12 @@ interface MemoryAdapterOptions {
|
|
|
11
11
|
readonly homeDir?: string;
|
|
12
12
|
/** Optional hook runner exposed via `ctx.hooks` (default: undefined — hooks inert). */
|
|
13
13
|
readonly hooks?: HookRunner;
|
|
14
|
+
/** Override for `fs.homedir()` (default: `'/home/user'`). */
|
|
15
|
+
readonly home?: string;
|
|
16
|
+
/** Override for `fs.xdgConfigHome()` (default: `'/home/user/.config'`). */
|
|
17
|
+
readonly xdg?: string;
|
|
18
|
+
/** Override for `fs.systemConfigPath()` (default: `'/etc/gitconfig'`). */
|
|
19
|
+
readonly systemConfig?: string;
|
|
14
20
|
}
|
|
15
21
|
declare function createMemoryContext(options?: MemoryAdapterOptions): Context;
|
|
16
22
|
|
|
@@ -25,6 +31,9 @@ declare class MemoryCompressor implements Compressor {
|
|
|
25
31
|
interface MemoryFileSystemOptions {
|
|
26
32
|
readonly rootDir: string;
|
|
27
33
|
readonly files?: Readonly<Record<string, Uint8Array>>;
|
|
34
|
+
readonly home?: string;
|
|
35
|
+
readonly xdg?: string;
|
|
36
|
+
readonly systemConfig?: string;
|
|
28
37
|
}
|
|
29
38
|
declare class MemoryFileSystem implements FileSystem {
|
|
30
39
|
private readonly files;
|
|
@@ -32,7 +41,13 @@ declare class MemoryFileSystem implements FileSystem {
|
|
|
32
41
|
private readonly symlinks;
|
|
33
42
|
private readonly times;
|
|
34
43
|
private readonly rootDir;
|
|
44
|
+
private readonly homePath;
|
|
45
|
+
private readonly xdgPath;
|
|
46
|
+
private readonly systemPath;
|
|
35
47
|
constructor(options: MemoryFileSystemOptions);
|
|
48
|
+
homedir: () => string;
|
|
49
|
+
xdgConfigHome: () => string;
|
|
50
|
+
systemConfigPath: () => string;
|
|
36
51
|
read: (path: string) => Promise<Uint8Array>;
|
|
37
52
|
readSlice: (path: string, offset: number, length: number) => Promise<Uint8Array>;
|
|
38
53
|
readUtf8: (path: string) => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as HookRunner, b as Context, C as Compressor, I as InflateStreamResult, F as FileSystem, d as FileStat, D as DirEntry, e as FileHandle, H as HashService, f as Hasher, g as HookName, h as HookResult, i as HookRequest } from '../../chunks/context-CCL0_F8R.js';
|
|
2
|
+
import { H as HttpTransport, a as HttpRequest, b as HttpResponse } from '../../chunks/http-transport--_NdQOiw.js';
|
|
3
3
|
|
|
4
4
|
interface MemoryAdapterOptions {
|
|
5
5
|
readonly files?: Readonly<Record<string, Uint8Array>>;
|
|
@@ -11,6 +11,12 @@ interface MemoryAdapterOptions {
|
|
|
11
11
|
readonly homeDir?: string;
|
|
12
12
|
/** Optional hook runner exposed via `ctx.hooks` (default: undefined — hooks inert). */
|
|
13
13
|
readonly hooks?: HookRunner;
|
|
14
|
+
/** Override for `fs.homedir()` (default: `'/home/user'`). */
|
|
15
|
+
readonly home?: string;
|
|
16
|
+
/** Override for `fs.xdgConfigHome()` (default: `'/home/user/.config'`). */
|
|
17
|
+
readonly xdg?: string;
|
|
18
|
+
/** Override for `fs.systemConfigPath()` (default: `'/etc/gitconfig'`). */
|
|
19
|
+
readonly systemConfig?: string;
|
|
14
20
|
}
|
|
15
21
|
declare function createMemoryContext(options?: MemoryAdapterOptions): Context;
|
|
16
22
|
|
|
@@ -25,6 +31,9 @@ declare class MemoryCompressor implements Compressor {
|
|
|
25
31
|
interface MemoryFileSystemOptions {
|
|
26
32
|
readonly rootDir: string;
|
|
27
33
|
readonly files?: Readonly<Record<string, Uint8Array>>;
|
|
34
|
+
readonly home?: string;
|
|
35
|
+
readonly xdg?: string;
|
|
36
|
+
readonly systemConfig?: string;
|
|
28
37
|
}
|
|
29
38
|
declare class MemoryFileSystem implements FileSystem {
|
|
30
39
|
private readonly files;
|
|
@@ -32,7 +41,13 @@ declare class MemoryFileSystem implements FileSystem {
|
|
|
32
41
|
private readonly symlinks;
|
|
33
42
|
private readonly times;
|
|
34
43
|
private readonly rootDir;
|
|
44
|
+
private readonly homePath;
|
|
45
|
+
private readonly xdgPath;
|
|
46
|
+
private readonly systemPath;
|
|
35
47
|
constructor(options: MemoryFileSystemOptions);
|
|
48
|
+
homedir: () => string;
|
|
49
|
+
xdgConfigHome: () => string;
|
|
50
|
+
systemConfigPath: () => string;
|
|
36
51
|
read: (path: string) => Promise<Uint8Array>;
|
|
37
52
|
readSlice: (path: string, offset: number, length: number) => Promise<Uint8Array>;
|
|
38
53
|
readUtf8: (path: string) => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Context, C as Compressor, I as InflateStreamResult,
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, F as FileSystem, d as FileStat, D as DirEntry, e as FileHandle, H as HashService, f as Hasher, a as HookRunner, i as HookRequest, h as HookResult } from '../../chunks/context-YDw6qicq.cjs';
|
|
2
|
+
import { H as HttpTransport, a as HttpRequest, b as HttpResponse } from '../../chunks/http-transport--_NdQOiw.cjs';
|
|
3
3
|
|
|
4
4
|
interface NodeAdapterOptions {
|
|
5
5
|
readonly workDir: string;
|
|
@@ -171,6 +171,9 @@ declare class NodeFileSystem implements FileSystem {
|
|
|
171
171
|
private realpathForCreation;
|
|
172
172
|
private resolveForMode;
|
|
173
173
|
private checkContainment;
|
|
174
|
+
homedir(): string;
|
|
175
|
+
xdgConfigHome(): string;
|
|
176
|
+
systemConfigPath(): string;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
type Algorithm = 'sha1' | 'sha256';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as Context, C as Compressor, I as InflateStreamResult,
|
|
2
|
-
import {
|
|
1
|
+
import { b as Context, C as Compressor, I as InflateStreamResult, F as FileSystem, d as FileStat, D as DirEntry, e as FileHandle, H as HashService, f as Hasher, a as HookRunner, i as HookRequest, h as HookResult } from '../../chunks/context-CCL0_F8R.js';
|
|
2
|
+
import { H as HttpTransport, a as HttpRequest, b as HttpResponse } from '../../chunks/http-transport--_NdQOiw.js';
|
|
3
3
|
|
|
4
4
|
interface NodeAdapterOptions {
|
|
5
5
|
readonly workDir: string;
|
|
@@ -171,6 +171,9 @@ declare class NodeFileSystem implements FileSystem {
|
|
|
171
171
|
private realpathForCreation;
|
|
172
172
|
private resolveForMode;
|
|
173
173
|
private checkContainment;
|
|
174
|
+
homedir(): string;
|
|
175
|
+
xdgConfigHome(): string;
|
|
176
|
+
systemConfigPath(): string;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
type Algorithm = 'sha1' | 'sha256';
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as HttpTransport } from './http-transport--_NdQOiw.js';
|
|
2
|
+
|
|
3
|
+
interface HashConfig {
|
|
4
|
+
readonly digestLength: 20 | 32;
|
|
5
|
+
readonly hexLength: 40 | 64;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type ObjectId = string & {
|
|
9
|
+
readonly __brand: unique symbol;
|
|
10
|
+
};
|
|
11
|
+
declare const ObjectId: {
|
|
12
|
+
readonly from: (hex: string) => ObjectId;
|
|
13
|
+
readonly fromRaw: (bytes: Uint8Array) => ObjectId;
|
|
14
|
+
};
|
|
15
|
+
type RefName = string & {
|
|
16
|
+
readonly __brand: unique symbol;
|
|
17
|
+
};
|
|
18
|
+
declare const RefName: {
|
|
19
|
+
readonly from: (name: string) => RefName;
|
|
20
|
+
};
|
|
21
|
+
type FilePath = string & {
|
|
22
|
+
readonly __brand: unique symbol;
|
|
23
|
+
};
|
|
24
|
+
declare const FilePath: {
|
|
25
|
+
readonly from: (path: string) => FilePath;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface LruCache<V> {
|
|
29
|
+
get(key: string): V | undefined;
|
|
30
|
+
set(key: string, value: V, byteSize: number): void;
|
|
31
|
+
has(key: string): boolean;
|
|
32
|
+
delete(key: string): boolean;
|
|
33
|
+
clear(): void;
|
|
34
|
+
readonly currentSize: number;
|
|
35
|
+
readonly maxSize: number;
|
|
36
|
+
readonly entryCount: number;
|
|
37
|
+
}
|
|
2
38
|
|
|
3
39
|
interface InflateStreamResult {
|
|
4
40
|
/** The fully-inflated output bytes. */
|
|
@@ -151,6 +187,32 @@ interface FileSystem {
|
|
|
151
187
|
* Throws `PERMISSION_DENIED` if the leaf is a symlink.
|
|
152
188
|
*/
|
|
153
189
|
readonly openWithNoFollow: (path: string, mode: 'read' | 'write') => Promise<FileHandle>;
|
|
190
|
+
/**
|
|
191
|
+
* Absolute path to the current user's home directory.
|
|
192
|
+
*
|
|
193
|
+
* - Node: `os.homedir()`.
|
|
194
|
+
* - Memory: a fixed value injected via constructor options (default `'/home/user'`).
|
|
195
|
+
* - Browser: throws `UNSUPPORTED_OPERATION` (no concept of a home directory).
|
|
196
|
+
*/
|
|
197
|
+
readonly homedir: () => string;
|
|
198
|
+
/**
|
|
199
|
+
* Absolute path to the user's XDG config home — `$XDG_CONFIG_HOME` when set
|
|
200
|
+
* and non-empty, otherwise `<homedir>/.config`.
|
|
201
|
+
*
|
|
202
|
+
* - Node: reads `process.env.XDG_CONFIG_HOME`, falls back to `<homedir>/.config`.
|
|
203
|
+
* - Memory: fixed value injected via constructor options.
|
|
204
|
+
* - Browser: throws `UNSUPPORTED_OPERATION`.
|
|
205
|
+
*/
|
|
206
|
+
readonly xdgConfigHome: () => string;
|
|
207
|
+
/**
|
|
208
|
+
* Absolute path to the platform's system git config file.
|
|
209
|
+
*
|
|
210
|
+
* - Node POSIX: `/etc/gitconfig`.
|
|
211
|
+
* - Node Windows: `<ProgramData>\Git\config` (ProgramData from env, default `C:\ProgramData`).
|
|
212
|
+
* - Memory: fixed value injected via constructor options.
|
|
213
|
+
* - Browser: throws `UNSUPPORTED_OPERATION`.
|
|
214
|
+
*/
|
|
215
|
+
readonly systemConfigPath: () => string;
|
|
154
216
|
}
|
|
155
217
|
|
|
156
218
|
/** Incremental hash computation context. Single-use: consumed after digest. */
|
|
@@ -175,42 +237,6 @@ interface HashService {
|
|
|
175
237
|
readonly digestLength: 20 | 32;
|
|
176
238
|
}
|
|
177
239
|
|
|
178
|
-
type ObjectId = string & {
|
|
179
|
-
readonly __brand: unique symbol;
|
|
180
|
-
};
|
|
181
|
-
declare const ObjectId: {
|
|
182
|
-
readonly from: (hex: string) => ObjectId;
|
|
183
|
-
readonly fromRaw: (bytes: Uint8Array) => ObjectId;
|
|
184
|
-
};
|
|
185
|
-
type RefName = string & {
|
|
186
|
-
readonly __brand: unique symbol;
|
|
187
|
-
};
|
|
188
|
-
declare const RefName: {
|
|
189
|
-
readonly from: (name: string) => RefName;
|
|
190
|
-
};
|
|
191
|
-
type FilePath = string & {
|
|
192
|
-
readonly __brand: unique symbol;
|
|
193
|
-
};
|
|
194
|
-
declare const FilePath: {
|
|
195
|
-
readonly from: (path: string) => FilePath;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
interface HashConfig {
|
|
199
|
-
readonly digestLength: 20 | 32;
|
|
200
|
-
readonly hexLength: 40 | 64;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
interface LruCache<V> {
|
|
204
|
-
get(key: string): V | undefined;
|
|
205
|
-
set(key: string, value: V, byteSize: number): void;
|
|
206
|
-
has(key: string): boolean;
|
|
207
|
-
delete(key: string): boolean;
|
|
208
|
-
clear(): void;
|
|
209
|
-
readonly currentSize: number;
|
|
210
|
-
readonly maxSize: number;
|
|
211
|
-
readonly entryCount: number;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
240
|
/**
|
|
215
241
|
* The lifecycle hooks tsgit invokes. Extend the union to add a hook.
|
|
216
242
|
*
|
|
@@ -463,5 +489,5 @@ interface CreateContextParts {
|
|
|
463
489
|
/** Assemble a frozen Context from its constituent ports + layout. */
|
|
464
490
|
declare function createContext(parts: CreateContextParts): Context;
|
|
465
491
|
|
|
466
|
-
export { ObjectId as O,
|
|
467
|
-
export type { AuthStrategy as A, Compressor as C, DirEntry as D,
|
|
492
|
+
export { ObjectId as O, FilePath as c, RefName as j, createContext as p, noopLogger as q, wrapLoggerSanitizer as w };
|
|
493
|
+
export type { AuthStrategy as A, Compressor as C, DirEntry as D, FileSystem as F, HashService as H, InflateStreamResult as I, Logger as L, ProgressReporter as P, RepositoryConfig as R, HookRunner as a, Context as b, FileStat as d, FileHandle as e, Hasher as f, HookName as g, HookResult as h, HookRequest as i, AuthorIdentity as k, CreateContextParts as l, PromisorFetchOutcome as m, PromisorRemote as n, RepositoryLayout as o };
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as HttpTransport } from './http-transport--_NdQOiw.cjs';
|
|
2
|
+
|
|
3
|
+
interface HashConfig {
|
|
4
|
+
readonly digestLength: 20 | 32;
|
|
5
|
+
readonly hexLength: 40 | 64;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type ObjectId = string & {
|
|
9
|
+
readonly __brand: unique symbol;
|
|
10
|
+
};
|
|
11
|
+
declare const ObjectId: {
|
|
12
|
+
readonly from: (hex: string) => ObjectId;
|
|
13
|
+
readonly fromRaw: (bytes: Uint8Array) => ObjectId;
|
|
14
|
+
};
|
|
15
|
+
type RefName = string & {
|
|
16
|
+
readonly __brand: unique symbol;
|
|
17
|
+
};
|
|
18
|
+
declare const RefName: {
|
|
19
|
+
readonly from: (name: string) => RefName;
|
|
20
|
+
};
|
|
21
|
+
type FilePath = string & {
|
|
22
|
+
readonly __brand: unique symbol;
|
|
23
|
+
};
|
|
24
|
+
declare const FilePath: {
|
|
25
|
+
readonly from: (path: string) => FilePath;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
interface LruCache<V> {
|
|
29
|
+
get(key: string): V | undefined;
|
|
30
|
+
set(key: string, value: V, byteSize: number): void;
|
|
31
|
+
has(key: string): boolean;
|
|
32
|
+
delete(key: string): boolean;
|
|
33
|
+
clear(): void;
|
|
34
|
+
readonly currentSize: number;
|
|
35
|
+
readonly maxSize: number;
|
|
36
|
+
readonly entryCount: number;
|
|
37
|
+
}
|
|
2
38
|
|
|
3
39
|
interface InflateStreamResult {
|
|
4
40
|
/** The fully-inflated output bytes. */
|
|
@@ -151,6 +187,32 @@ interface FileSystem {
|
|
|
151
187
|
* Throws `PERMISSION_DENIED` if the leaf is a symlink.
|
|
152
188
|
*/
|
|
153
189
|
readonly openWithNoFollow: (path: string, mode: 'read' | 'write') => Promise<FileHandle>;
|
|
190
|
+
/**
|
|
191
|
+
* Absolute path to the current user's home directory.
|
|
192
|
+
*
|
|
193
|
+
* - Node: `os.homedir()`.
|
|
194
|
+
* - Memory: a fixed value injected via constructor options (default `'/home/user'`).
|
|
195
|
+
* - Browser: throws `UNSUPPORTED_OPERATION` (no concept of a home directory).
|
|
196
|
+
*/
|
|
197
|
+
readonly homedir: () => string;
|
|
198
|
+
/**
|
|
199
|
+
* Absolute path to the user's XDG config home — `$XDG_CONFIG_HOME` when set
|
|
200
|
+
* and non-empty, otherwise `<homedir>/.config`.
|
|
201
|
+
*
|
|
202
|
+
* - Node: reads `process.env.XDG_CONFIG_HOME`, falls back to `<homedir>/.config`.
|
|
203
|
+
* - Memory: fixed value injected via constructor options.
|
|
204
|
+
* - Browser: throws `UNSUPPORTED_OPERATION`.
|
|
205
|
+
*/
|
|
206
|
+
readonly xdgConfigHome: () => string;
|
|
207
|
+
/**
|
|
208
|
+
* Absolute path to the platform's system git config file.
|
|
209
|
+
*
|
|
210
|
+
* - Node POSIX: `/etc/gitconfig`.
|
|
211
|
+
* - Node Windows: `<ProgramData>\Git\config` (ProgramData from env, default `C:\ProgramData`).
|
|
212
|
+
* - Memory: fixed value injected via constructor options.
|
|
213
|
+
* - Browser: throws `UNSUPPORTED_OPERATION`.
|
|
214
|
+
*/
|
|
215
|
+
readonly systemConfigPath: () => string;
|
|
154
216
|
}
|
|
155
217
|
|
|
156
218
|
/** Incremental hash computation context. Single-use: consumed after digest. */
|
|
@@ -175,42 +237,6 @@ interface HashService {
|
|
|
175
237
|
readonly digestLength: 20 | 32;
|
|
176
238
|
}
|
|
177
239
|
|
|
178
|
-
type ObjectId = string & {
|
|
179
|
-
readonly __brand: unique symbol;
|
|
180
|
-
};
|
|
181
|
-
declare const ObjectId: {
|
|
182
|
-
readonly from: (hex: string) => ObjectId;
|
|
183
|
-
readonly fromRaw: (bytes: Uint8Array) => ObjectId;
|
|
184
|
-
};
|
|
185
|
-
type RefName = string & {
|
|
186
|
-
readonly __brand: unique symbol;
|
|
187
|
-
};
|
|
188
|
-
declare const RefName: {
|
|
189
|
-
readonly from: (name: string) => RefName;
|
|
190
|
-
};
|
|
191
|
-
type FilePath = string & {
|
|
192
|
-
readonly __brand: unique symbol;
|
|
193
|
-
};
|
|
194
|
-
declare const FilePath: {
|
|
195
|
-
readonly from: (path: string) => FilePath;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
interface HashConfig {
|
|
199
|
-
readonly digestLength: 20 | 32;
|
|
200
|
-
readonly hexLength: 40 | 64;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
interface LruCache<V> {
|
|
204
|
-
get(key: string): V | undefined;
|
|
205
|
-
set(key: string, value: V, byteSize: number): void;
|
|
206
|
-
has(key: string): boolean;
|
|
207
|
-
delete(key: string): boolean;
|
|
208
|
-
clear(): void;
|
|
209
|
-
readonly currentSize: number;
|
|
210
|
-
readonly maxSize: number;
|
|
211
|
-
readonly entryCount: number;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
240
|
/**
|
|
215
241
|
* The lifecycle hooks tsgit invokes. Extend the union to add a hook.
|
|
216
242
|
*
|
|
@@ -463,5 +489,5 @@ interface CreateContextParts {
|
|
|
463
489
|
/** Assemble a frozen Context from its constituent ports + layout. */
|
|
464
490
|
declare function createContext(parts: CreateContextParts): Context;
|
|
465
491
|
|
|
466
|
-
export { ObjectId as O,
|
|
467
|
-
export type { AuthStrategy as A, Compressor as C, DirEntry as D,
|
|
492
|
+
export { ObjectId as O, FilePath as c, RefName as j, createContext as p, noopLogger as q, wrapLoggerSanitizer as w };
|
|
493
|
+
export type { AuthStrategy as A, Compressor as C, DirEntry as D, FileSystem as F, HashService as H, InflateStreamResult as I, Logger as L, ProgressReporter as P, RepositoryConfig as R, HookRunner as a, Context as b, FileStat as d, FileHandle as e, Hasher as f, HookName as g, HookResult as h, HookRequest as i, AuthorIdentity as k, CreateContextParts as l, PromisorFetchOutcome as m, PromisorRemote as n, RepositoryLayout as o };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { O as ObjectId, c as FilePath } from './context-YDw6qicq.cjs';
|
|
2
|
+
import { F as FileMode } from './reflog-entry-BbNnXCTC.cjs';
|
|
3
|
+
|
|
4
|
+
interface IndexEntryFlags {
|
|
5
|
+
readonly assumeValid: boolean;
|
|
6
|
+
readonly stage: 0 | 1 | 2 | 3;
|
|
7
|
+
/** Index v3 extended flag — the path is intentionally absent from the working tree. */
|
|
8
|
+
readonly skipWorktree: boolean;
|
|
9
|
+
/** Index v3 extended flag — `git add -N` placeholder. Modelled for faithful round-tripping. */
|
|
10
|
+
readonly intentToAdd: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface IndexEntry {
|
|
13
|
+
readonly ctimeSeconds: number;
|
|
14
|
+
readonly ctimeNanoseconds: number;
|
|
15
|
+
readonly mtimeSeconds: number;
|
|
16
|
+
readonly mtimeNanoseconds: number;
|
|
17
|
+
readonly dev: number;
|
|
18
|
+
readonly ino: number;
|
|
19
|
+
readonly mode: FileMode;
|
|
20
|
+
readonly uid: number;
|
|
21
|
+
readonly gid: number;
|
|
22
|
+
readonly fileSize: number;
|
|
23
|
+
readonly id: ObjectId;
|
|
24
|
+
readonly flags: IndexEntryFlags;
|
|
25
|
+
readonly path: FilePath;
|
|
26
|
+
}
|
|
27
|
+
interface IndexExtension {
|
|
28
|
+
readonly signature: string;
|
|
29
|
+
readonly data: Uint8Array;
|
|
30
|
+
}
|
|
31
|
+
interface GitIndex {
|
|
32
|
+
readonly version: 2 | 3;
|
|
33
|
+
readonly entries: ReadonlyArray<IndexEntry>;
|
|
34
|
+
readonly extensions: ReadonlyArray<IndexExtension>;
|
|
35
|
+
/**
|
|
36
|
+
* Trailing hash bytes (SHA-1: 20 bytes, SHA-256: 32 bytes) that close the
|
|
37
|
+
* index file format. Read but historically discarded; surfaced here so
|
|
38
|
+
* `CachingIndexResolver` can use it for the racy-stat fallback path
|
|
39
|
+
* (compare trailing bytes when `(mtime, size, ino)` match an observed
|
|
40
|
+
* stat but the underlying file may have been mutated in the racy-stat
|
|
41
|
+
* window — see design §10.4). Empty (`Uint8Array(0)`) when constructed
|
|
42
|
+
* from the empty-index defaults in `readIndex` (no underlying file).
|
|
43
|
+
*/
|
|
44
|
+
readonly trailerSha: Uint8Array;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type { GitIndex as G, IndexEntry as I, IndexEntryFlags as a };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { O as ObjectId, c as FilePath } from './context-CCL0_F8R.js';
|
|
2
|
+
import { F as FileMode } from './reflog-entry-CSzjnZd4.js';
|
|
3
|
+
|
|
4
|
+
interface IndexEntryFlags {
|
|
5
|
+
readonly assumeValid: boolean;
|
|
6
|
+
readonly stage: 0 | 1 | 2 | 3;
|
|
7
|
+
/** Index v3 extended flag — the path is intentionally absent from the working tree. */
|
|
8
|
+
readonly skipWorktree: boolean;
|
|
9
|
+
/** Index v3 extended flag — `git add -N` placeholder. Modelled for faithful round-tripping. */
|
|
10
|
+
readonly intentToAdd: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface IndexEntry {
|
|
13
|
+
readonly ctimeSeconds: number;
|
|
14
|
+
readonly ctimeNanoseconds: number;
|
|
15
|
+
readonly mtimeSeconds: number;
|
|
16
|
+
readonly mtimeNanoseconds: number;
|
|
17
|
+
readonly dev: number;
|
|
18
|
+
readonly ino: number;
|
|
19
|
+
readonly mode: FileMode;
|
|
20
|
+
readonly uid: number;
|
|
21
|
+
readonly gid: number;
|
|
22
|
+
readonly fileSize: number;
|
|
23
|
+
readonly id: ObjectId;
|
|
24
|
+
readonly flags: IndexEntryFlags;
|
|
25
|
+
readonly path: FilePath;
|
|
26
|
+
}
|
|
27
|
+
interface IndexExtension {
|
|
28
|
+
readonly signature: string;
|
|
29
|
+
readonly data: Uint8Array;
|
|
30
|
+
}
|
|
31
|
+
interface GitIndex {
|
|
32
|
+
readonly version: 2 | 3;
|
|
33
|
+
readonly entries: ReadonlyArray<IndexEntry>;
|
|
34
|
+
readonly extensions: ReadonlyArray<IndexExtension>;
|
|
35
|
+
/**
|
|
36
|
+
* Trailing hash bytes (SHA-1: 20 bytes, SHA-256: 32 bytes) that close the
|
|
37
|
+
* index file format. Read but historically discarded; surfaced here so
|
|
38
|
+
* `CachingIndexResolver` can use it for the racy-stat fallback path
|
|
39
|
+
* (compare trailing bytes when `(mtime, size, ino)` match an observed
|
|
40
|
+
* stat but the underlying file may have been mutated in the racy-stat
|
|
41
|
+
* window — see design §10.4). Empty (`Uint8Array(0)`) when constructed
|
|
42
|
+
* from the empty-index defaults in `readIndex` (no underlying file).
|
|
43
|
+
*/
|
|
44
|
+
readonly trailerSha: Uint8Array;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type { GitIndex as G, IndexEntry as I, IndexEntryFlags as a };
|