gitx.do 0.0.1 → 0.0.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.
Files changed (237) hide show
  1. package/dist/cli/commands/blame.d.ts +259 -0
  2. package/dist/cli/commands/blame.d.ts.map +1 -0
  3. package/dist/cli/commands/blame.js +609 -0
  4. package/dist/cli/commands/blame.js.map +1 -0
  5. package/dist/cli/commands/branch.d.ts +249 -0
  6. package/dist/cli/commands/branch.d.ts.map +1 -0
  7. package/dist/cli/commands/branch.js +693 -0
  8. package/dist/cli/commands/branch.js.map +1 -0
  9. package/dist/cli/commands/commit.d.ts +182 -0
  10. package/dist/cli/commands/commit.d.ts.map +1 -0
  11. package/dist/cli/commands/commit.js +437 -0
  12. package/dist/cli/commands/commit.js.map +1 -0
  13. package/dist/cli/commands/diff.d.ts +464 -0
  14. package/dist/cli/commands/diff.d.ts.map +1 -0
  15. package/dist/cli/commands/diff.js +958 -0
  16. package/dist/cli/commands/diff.js.map +1 -0
  17. package/dist/cli/commands/log.d.ts +239 -0
  18. package/dist/cli/commands/log.d.ts.map +1 -0
  19. package/dist/cli/commands/log.js +535 -0
  20. package/dist/cli/commands/log.js.map +1 -0
  21. package/dist/cli/commands/review.d.ts +457 -0
  22. package/dist/cli/commands/review.d.ts.map +1 -0
  23. package/dist/cli/commands/review.js +533 -0
  24. package/dist/cli/commands/review.js.map +1 -0
  25. package/dist/cli/commands/status.d.ts +269 -0
  26. package/dist/cli/commands/status.d.ts.map +1 -0
  27. package/dist/cli/commands/status.js +493 -0
  28. package/dist/cli/commands/status.js.map +1 -0
  29. package/dist/cli/commands/web.d.ts +199 -0
  30. package/dist/cli/commands/web.d.ts.map +1 -0
  31. package/dist/cli/commands/web.js +696 -0
  32. package/dist/cli/commands/web.js.map +1 -0
  33. package/dist/cli/fs-adapter.d.ts +656 -0
  34. package/dist/cli/fs-adapter.d.ts.map +1 -0
  35. package/dist/cli/fs-adapter.js +1179 -0
  36. package/dist/cli/fs-adapter.js.map +1 -0
  37. package/dist/cli/index.d.ts +387 -0
  38. package/dist/cli/index.d.ts.map +1 -0
  39. package/dist/cli/index.js +523 -0
  40. package/dist/cli/index.js.map +1 -0
  41. package/dist/cli/ui/components/DiffView.d.ts +7 -0
  42. package/dist/cli/ui/components/DiffView.d.ts.map +1 -0
  43. package/dist/cli/ui/components/DiffView.js +11 -0
  44. package/dist/cli/ui/components/DiffView.js.map +1 -0
  45. package/dist/cli/ui/components/ErrorDisplay.d.ts +6 -0
  46. package/dist/cli/ui/components/ErrorDisplay.d.ts.map +1 -0
  47. package/dist/cli/ui/components/ErrorDisplay.js +11 -0
  48. package/dist/cli/ui/components/ErrorDisplay.js.map +1 -0
  49. package/dist/cli/ui/components/FuzzySearch.d.ts +9 -0
  50. package/dist/cli/ui/components/FuzzySearch.d.ts.map +1 -0
  51. package/dist/cli/ui/components/FuzzySearch.js +12 -0
  52. package/dist/cli/ui/components/FuzzySearch.js.map +1 -0
  53. package/dist/cli/ui/components/LoadingSpinner.d.ts +6 -0
  54. package/dist/cli/ui/components/LoadingSpinner.d.ts.map +1 -0
  55. package/dist/cli/ui/components/LoadingSpinner.js +10 -0
  56. package/dist/cli/ui/components/LoadingSpinner.js.map +1 -0
  57. package/dist/cli/ui/components/NavigationList.d.ts +9 -0
  58. package/dist/cli/ui/components/NavigationList.d.ts.map +1 -0
  59. package/dist/cli/ui/components/NavigationList.js +11 -0
  60. package/dist/cli/ui/components/NavigationList.js.map +1 -0
  61. package/dist/cli/ui/components/ScrollableContent.d.ts +8 -0
  62. package/dist/cli/ui/components/ScrollableContent.d.ts.map +1 -0
  63. package/dist/cli/ui/components/ScrollableContent.js +11 -0
  64. package/dist/cli/ui/components/ScrollableContent.js.map +1 -0
  65. package/dist/cli/ui/components/index.d.ts +7 -0
  66. package/dist/cli/ui/components/index.d.ts.map +1 -0
  67. package/dist/cli/ui/components/index.js +9 -0
  68. package/dist/cli/ui/components/index.js.map +1 -0
  69. package/dist/cli/ui/terminal-ui.d.ts +52 -0
  70. package/dist/cli/ui/terminal-ui.d.ts.map +1 -0
  71. package/dist/cli/ui/terminal-ui.js +121 -0
  72. package/dist/cli/ui/terminal-ui.js.map +1 -0
  73. package/dist/durable-object/object-store.d.ts +401 -23
  74. package/dist/durable-object/object-store.d.ts.map +1 -1
  75. package/dist/durable-object/object-store.js +414 -25
  76. package/dist/durable-object/object-store.js.map +1 -1
  77. package/dist/durable-object/schema.d.ts +188 -0
  78. package/dist/durable-object/schema.d.ts.map +1 -1
  79. package/dist/durable-object/schema.js +160 -0
  80. package/dist/durable-object/schema.js.map +1 -1
  81. package/dist/durable-object/wal.d.ts +336 -31
  82. package/dist/durable-object/wal.d.ts.map +1 -1
  83. package/dist/durable-object/wal.js +272 -27
  84. package/dist/durable-object/wal.js.map +1 -1
  85. package/dist/index.d.ts +379 -3
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +379 -7
  88. package/dist/index.js.map +1 -1
  89. package/dist/mcp/adapter.d.ts +579 -38
  90. package/dist/mcp/adapter.d.ts.map +1 -1
  91. package/dist/mcp/adapter.js +426 -33
  92. package/dist/mcp/adapter.js.map +1 -1
  93. package/dist/mcp/sandbox.d.ts +532 -29
  94. package/dist/mcp/sandbox.d.ts.map +1 -1
  95. package/dist/mcp/sandbox.js +389 -22
  96. package/dist/mcp/sandbox.js.map +1 -1
  97. package/dist/mcp/sdk-adapter.d.ts +478 -56
  98. package/dist/mcp/sdk-adapter.d.ts.map +1 -1
  99. package/dist/mcp/sdk-adapter.js +346 -44
  100. package/dist/mcp/sdk-adapter.js.map +1 -1
  101. package/dist/mcp/tools.d.ts +445 -30
  102. package/dist/mcp/tools.d.ts.map +1 -1
  103. package/dist/mcp/tools.js +363 -33
  104. package/dist/mcp/tools.js.map +1 -1
  105. package/dist/ops/blame.d.ts +424 -21
  106. package/dist/ops/blame.d.ts.map +1 -1
  107. package/dist/ops/blame.js +303 -20
  108. package/dist/ops/blame.js.map +1 -1
  109. package/dist/ops/branch.d.ts +583 -32
  110. package/dist/ops/branch.d.ts.map +1 -1
  111. package/dist/ops/branch.js +365 -23
  112. package/dist/ops/branch.js.map +1 -1
  113. package/dist/ops/commit-traversal.d.ts +164 -24
  114. package/dist/ops/commit-traversal.d.ts.map +1 -1
  115. package/dist/ops/commit-traversal.js +68 -2
  116. package/dist/ops/commit-traversal.js.map +1 -1
  117. package/dist/ops/commit.d.ts +387 -53
  118. package/dist/ops/commit.d.ts.map +1 -1
  119. package/dist/ops/commit.js +249 -29
  120. package/dist/ops/commit.js.map +1 -1
  121. package/dist/ops/merge-base.d.ts +195 -21
  122. package/dist/ops/merge-base.d.ts.map +1 -1
  123. package/dist/ops/merge-base.js +122 -12
  124. package/dist/ops/merge-base.js.map +1 -1
  125. package/dist/ops/merge.d.ts +600 -130
  126. package/dist/ops/merge.d.ts.map +1 -1
  127. package/dist/ops/merge.js +408 -60
  128. package/dist/ops/merge.js.map +1 -1
  129. package/dist/ops/tag.d.ts +67 -2
  130. package/dist/ops/tag.d.ts.map +1 -1
  131. package/dist/ops/tag.js +42 -1
  132. package/dist/ops/tag.js.map +1 -1
  133. package/dist/ops/tree-builder.d.ts +102 -6
  134. package/dist/ops/tree-builder.d.ts.map +1 -1
  135. package/dist/ops/tree-builder.js +30 -5
  136. package/dist/ops/tree-builder.js.map +1 -1
  137. package/dist/ops/tree-diff.d.ts +50 -2
  138. package/dist/ops/tree-diff.d.ts.map +1 -1
  139. package/dist/ops/tree-diff.js +50 -2
  140. package/dist/ops/tree-diff.js.map +1 -1
  141. package/dist/pack/delta.d.ts +211 -39
  142. package/dist/pack/delta.d.ts.map +1 -1
  143. package/dist/pack/delta.js +232 -46
  144. package/dist/pack/delta.js.map +1 -1
  145. package/dist/pack/format.d.ts +390 -28
  146. package/dist/pack/format.d.ts.map +1 -1
  147. package/dist/pack/format.js +344 -33
  148. package/dist/pack/format.js.map +1 -1
  149. package/dist/pack/full-generation.d.ts +313 -28
  150. package/dist/pack/full-generation.d.ts.map +1 -1
  151. package/dist/pack/full-generation.js +238 -19
  152. package/dist/pack/full-generation.js.map +1 -1
  153. package/dist/pack/generation.d.ts +346 -23
  154. package/dist/pack/generation.d.ts.map +1 -1
  155. package/dist/pack/generation.js +269 -21
  156. package/dist/pack/generation.js.map +1 -1
  157. package/dist/pack/index.d.ts +407 -86
  158. package/dist/pack/index.d.ts.map +1 -1
  159. package/dist/pack/index.js +351 -70
  160. package/dist/pack/index.js.map +1 -1
  161. package/dist/refs/branch.d.ts +517 -71
  162. package/dist/refs/branch.d.ts.map +1 -1
  163. package/dist/refs/branch.js +410 -26
  164. package/dist/refs/branch.js.map +1 -1
  165. package/dist/refs/storage.d.ts +610 -57
  166. package/dist/refs/storage.d.ts.map +1 -1
  167. package/dist/refs/storage.js +481 -29
  168. package/dist/refs/storage.js.map +1 -1
  169. package/dist/refs/tag.d.ts +677 -67
  170. package/dist/refs/tag.d.ts.map +1 -1
  171. package/dist/refs/tag.js +497 -30
  172. package/dist/refs/tag.js.map +1 -1
  173. package/dist/storage/lru-cache.d.ts +556 -53
  174. package/dist/storage/lru-cache.d.ts.map +1 -1
  175. package/dist/storage/lru-cache.js +439 -36
  176. package/dist/storage/lru-cache.js.map +1 -1
  177. package/dist/storage/object-index.d.ts +483 -38
  178. package/dist/storage/object-index.d.ts.map +1 -1
  179. package/dist/storage/object-index.js +388 -22
  180. package/dist/storage/object-index.js.map +1 -1
  181. package/dist/storage/r2-pack.d.ts +957 -94
  182. package/dist/storage/r2-pack.d.ts.map +1 -1
  183. package/dist/storage/r2-pack.js +756 -48
  184. package/dist/storage/r2-pack.js.map +1 -1
  185. package/dist/tiered/cdc-pipeline.d.ts +1610 -38
  186. package/dist/tiered/cdc-pipeline.d.ts.map +1 -1
  187. package/dist/tiered/cdc-pipeline.js +1131 -22
  188. package/dist/tiered/cdc-pipeline.js.map +1 -1
  189. package/dist/tiered/migration.d.ts +903 -41
  190. package/dist/tiered/migration.d.ts.map +1 -1
  191. package/dist/tiered/migration.js +646 -24
  192. package/dist/tiered/migration.js.map +1 -1
  193. package/dist/tiered/parquet-writer.d.ts +944 -47
  194. package/dist/tiered/parquet-writer.d.ts.map +1 -1
  195. package/dist/tiered/parquet-writer.js +667 -39
  196. package/dist/tiered/parquet-writer.js.map +1 -1
  197. package/dist/tiered/read-path.d.ts +728 -34
  198. package/dist/tiered/read-path.d.ts.map +1 -1
  199. package/dist/tiered/read-path.js +310 -27
  200. package/dist/tiered/read-path.js.map +1 -1
  201. package/dist/types/objects.d.ts +457 -0
  202. package/dist/types/objects.d.ts.map +1 -1
  203. package/dist/types/objects.js +305 -4
  204. package/dist/types/objects.js.map +1 -1
  205. package/dist/types/storage.d.ts +407 -35
  206. package/dist/types/storage.d.ts.map +1 -1
  207. package/dist/types/storage.js +27 -3
  208. package/dist/types/storage.js.map +1 -1
  209. package/dist/utils/hash.d.ts +133 -12
  210. package/dist/utils/hash.d.ts.map +1 -1
  211. package/dist/utils/hash.js +133 -12
  212. package/dist/utils/hash.js.map +1 -1
  213. package/dist/utils/sha1.d.ts +102 -9
  214. package/dist/utils/sha1.d.ts.map +1 -1
  215. package/dist/utils/sha1.js +114 -11
  216. package/dist/utils/sha1.js.map +1 -1
  217. package/dist/wire/capabilities.d.ts +896 -88
  218. package/dist/wire/capabilities.d.ts.map +1 -1
  219. package/dist/wire/capabilities.js +566 -62
  220. package/dist/wire/capabilities.js.map +1 -1
  221. package/dist/wire/pkt-line.d.ts +293 -15
  222. package/dist/wire/pkt-line.d.ts.map +1 -1
  223. package/dist/wire/pkt-line.js +251 -15
  224. package/dist/wire/pkt-line.js.map +1 -1
  225. package/dist/wire/receive-pack.d.ts +814 -64
  226. package/dist/wire/receive-pack.d.ts.map +1 -1
  227. package/dist/wire/receive-pack.js +542 -41
  228. package/dist/wire/receive-pack.js.map +1 -1
  229. package/dist/wire/smart-http.d.ts +575 -97
  230. package/dist/wire/smart-http.d.ts.map +1 -1
  231. package/dist/wire/smart-http.js +337 -46
  232. package/dist/wire/smart-http.js.map +1 -1
  233. package/dist/wire/upload-pack.d.ts +492 -98
  234. package/dist/wire/upload-pack.d.ts.map +1 -1
  235. package/dist/wire/upload-pack.js +347 -59
  236. package/dist/wire/upload-pack.js.map +1 -1
  237. package/package.json +10 -2
@@ -1,181 +1,502 @@
1
1
  /**
2
- * Git Pack Index (.idx) File Format Implementation
3
- *
4
- * The pack index file provides a mechanism to efficiently locate objects
5
- * within a packfile without scanning the entire pack.
6
- *
7
- * Pack Index Version 2 Format:
8
- * - 4 bytes: magic number (0xff744f63 = "\377tOc")
9
- * - 4 bytes: version number (2)
10
- * - 256 * 4 bytes: fanout table (cumulative count of objects for each first byte)
11
- * - N * 20 bytes: sorted object IDs (N = total objects from fanout[255])
12
- * - N * 4 bytes: CRC32 checksums for each object
13
- * - N * 4 bytes: 4-byte pack file offsets
14
- * - M * 8 bytes: 8-byte pack file offsets for objects > 2GB (M = count of large offsets)
15
- * - 20 bytes: packfile SHA-1 checksum
16
- * - 20 bytes: index file SHA-1 checksum
2
+ * @fileoverview Git Pack Index (.idx) File Format Implementation
3
+ *
4
+ * This module implements the Git pack index (version 2) format, which provides
5
+ * efficient random access to objects within a packfile. Without an index, finding
6
+ * an object in a packfile would require scanning the entire file.
7
+ *
8
+ * ## Pack Index Version 2 Structure
9
+ *
10
+ * | Section | Size | Description |
11
+ * |------------------------|-------------------------|--------------------------------------------|
12
+ * | Magic number | 4 bytes | 0xff744f63 ("\377tOc") |
13
+ * | Version | 4 bytes | Version number (2) |
14
+ * | Fanout table | 256 * 4 bytes | Cumulative object counts by first SHA byte |
15
+ * | Object IDs | N * 20 bytes | Sorted SHA-1 hashes |
16
+ * | CRC32 checksums | N * 4 bytes | CRC32 of each packed object |
17
+ * | 4-byte offsets | N * 4 bytes | Pack file offsets (or large offset index) |
18
+ * | 8-byte large offsets | M * 8 bytes | For objects beyond 2GB |
19
+ * | Packfile checksum | 20 bytes | SHA-1 of the corresponding packfile |
20
+ * | Index checksum | 20 bytes | SHA-1 of this index file |
21
+ *
22
+ * ## Fanout Table
23
+ *
24
+ * The fanout table enables O(1) lookup of the range of objects starting with a given
25
+ * byte value. `fanout[i]` contains the cumulative count of objects whose SHA-1 hash
26
+ * starts with a byte <= i. This enables binary search within a narrow range.
27
+ *
28
+ * ## Large Offset Handling
29
+ *
30
+ * For packfiles larger than 2GB, offsets that don't fit in 4 bytes are stored in
31
+ * a separate 8-byte table. The 4-byte offset slot contains an index into this table
32
+ * with the MSB set to indicate it's an indirect reference.
33
+ *
34
+ * @module pack/index
35
+ * @see {@link https://git-scm.com/docs/pack-format} Git Pack Format Documentation
36
+ *
37
+ * @example
38
+ * // Parse an existing pack index
39
+ * import { parsePackIndex, lookupObject } from './index';
40
+ *
41
+ * const indexData = await readFile('objects/pack/pack-abc123.idx');
42
+ * const index = parsePackIndex(indexData);
43
+ *
44
+ * const entry = lookupObject(index, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3');
45
+ * if (entry) {
46
+ * console.log(`Object at offset ${entry.offset}`);
47
+ * }
17
48
  */
18
49
  import { PackObjectType } from './format';
50
+ /**
51
+ * The 4-byte signature that identifies a version 2 pack index file.
52
+ * The bytes are: 0xff 0x74 0x4f 0x63 (representing "\377tOc").
53
+ *
54
+ * Version 1 index files don't have this signature and start directly
55
+ * with the fanout table.
56
+ *
57
+ * @constant {Uint8Array}
58
+ */
19
59
  export declare const PACK_INDEX_SIGNATURE: Uint8Array<ArrayBuffer>;
60
+ /**
61
+ * The magic number as a 32-bit integer for easy comparison.
62
+ * Equivalent to reading the first 4 bytes as big-endian uint32.
63
+ *
64
+ * @constant {number}
65
+ */
20
66
  export declare const PACK_INDEX_MAGIC = 4285812579;
67
+ /**
68
+ * The pack index version number supported by this implementation.
69
+ * Version 2 is the current standard and supports large packfiles (>2GB).
70
+ *
71
+ * @constant {number}
72
+ */
21
73
  export declare const PACK_INDEX_VERSION = 2;
74
+ /**
75
+ * The byte threshold for using large offset encoding.
76
+ * Offsets >= 2GB (0x80000000) require 8-byte storage.
77
+ * In the 4-byte offset table, values with MSB set are indices
78
+ * into the large offset table instead of direct offsets.
79
+ *
80
+ * @constant {number}
81
+ */
22
82
  export declare const LARGE_OFFSET_THRESHOLD = 2147483648;
23
83
  /**
24
- * Represents a single entry in the pack index
84
+ * Represents a single entry in the pack index.
85
+ *
86
+ * @description Each entry contains the information needed to locate and verify
87
+ * an object within the packfile. The pack index stores one entry per object,
88
+ * sorted by object ID for efficient binary search.
89
+ *
90
+ * @interface PackIndexEntry
91
+ *
92
+ * @example
93
+ * const entry: PackIndexEntry = {
94
+ * objectId: 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',
95
+ * crc32: 0x12345678,
96
+ * offset: 1024
97
+ * };
25
98
  */
26
99
  export interface PackIndexEntry {
27
- /** 40-character hex SHA-1 object ID (primary property name) */
100
+ /**
101
+ * The 40-character hexadecimal SHA-1 object ID.
102
+ * This is the primary identifier for the object.
103
+ */
28
104
  objectId?: string;
29
- /** 40-character hex SHA-1 object ID (alias for backward compatibility) */
105
+ /**
106
+ * Alias for objectId, provided for backward compatibility.
107
+ * @deprecated Use objectId instead
108
+ */
30
109
  sha?: string;
31
- /** CRC32 checksum of the packed object data */
110
+ /**
111
+ * CRC32 checksum of the packed (compressed) object data.
112
+ * Used to verify integrity without full decompression.
113
+ */
32
114
  crc32: number;
33
- /** Offset within the pack file */
115
+ /**
116
+ * Byte offset of the object within the packfile.
117
+ * For large packfiles (>2GB), this may exceed 32-bit range.
118
+ */
34
119
  offset: number;
35
120
  }
36
121
  /**
37
- * Represents a parsed pack index file
122
+ * Represents a fully parsed pack index file.
123
+ *
124
+ * @description Contains all the information extracted from a .idx file,
125
+ * including the fanout table for efficient lookups and all object entries.
126
+ * This structure enables O(log n) object lookups using binary search.
127
+ *
128
+ * @interface PackIndex
129
+ *
130
+ * @example
131
+ * // Parse and use a pack index
132
+ * const index: PackIndex = parsePackIndex(indexData);
133
+ * console.log(`Index contains ${index.objectCount} objects`);
134
+ *
135
+ * // Look up an object
136
+ * const entry = lookupObject(index, objectSha);
38
137
  */
39
138
  export interface PackIndex {
40
- /** Version number (should be 2) */
139
+ /** Version number of the index format (should always be 2) */
41
140
  version: number;
42
- /** Total number of objects in the index */
141
+ /** Total number of objects indexed (equals fanout[255]) */
43
142
  objectCount: number;
44
- /** Fanout table: fanout[i] = cumulative count of objects with first byte <= i */
143
+ /**
144
+ * The 256-entry fanout table for O(1) range lookup.
145
+ * fanout[i] = cumulative count of objects whose first SHA byte is <= i.
146
+ * Used to narrow binary search to objects starting with a specific byte.
147
+ */
45
148
  fanout: Uint32Array;
46
- /** Array of all entries sorted by object ID */
149
+ /** Array of all index entries, sorted lexicographically by object ID */
47
150
  entries: PackIndexEntry[];
48
- /** SHA-1 checksum of the corresponding packfile */
151
+ /** SHA-1 checksum of the corresponding packfile (from pack trailer) */
49
152
  packChecksum: Uint8Array;
50
- /** SHA-1 checksum of the index file itself */
153
+ /** SHA-1 checksum of this index file (for integrity verification) */
51
154
  indexChecksum: Uint8Array;
52
155
  }
53
156
  /**
54
- * Result of looking up an object in the pack index
157
+ * Result of looking up an object in the pack index.
158
+ *
159
+ * @description Returned by lookup operations to indicate whether an object
160
+ * was found and provide its entry information if so.
161
+ *
162
+ * @interface PackIndexLookupResult
55
163
  */
56
164
  export interface PackIndexLookupResult {
57
- /** Whether the object was found */
165
+ /** Whether the object was found in the index */
58
166
  found: boolean;
59
- /** The entry if found */
167
+ /** The full entry if found, undefined otherwise */
60
168
  entry?: PackIndexEntry;
61
- /** Index position in the sorted list */
169
+ /** Zero-based position in the sorted entry list (useful for iteration) */
62
170
  position?: number;
63
171
  }
64
172
  /**
65
- * Options for creating a pack index
173
+ * Options for creating a pack index from a packfile.
174
+ *
175
+ * @description Configuration options passed to {@link createPackIndex}
176
+ * when generating an index file from packfile data.
177
+ *
178
+ * @interface CreatePackIndexOptions
66
179
  */
67
180
  export interface CreatePackIndexOptions {
68
- /** The packfile data to index */
181
+ /** The complete packfile binary data to create an index for */
69
182
  packData: Uint8Array;
70
183
  }
71
184
  /**
72
- * Parsed object from packfile for indexing
185
+ * Represents a parsed object from a packfile, used during indexing.
186
+ *
187
+ * @description Contains all the metadata needed to create an index entry
188
+ * for an object. This is typically populated when parsing through a packfile
189
+ * to build an index.
190
+ *
191
+ * @interface PackedObject
73
192
  */
74
193
  export interface PackedObject {
75
- /** Object ID (SHA-1 hash) */
194
+ /** The 40-character hexadecimal SHA-1 hash identifying this object */
76
195
  objectId: string;
77
- /** Object type */
196
+ /** The object type (commit, tree, blob, tag, or delta) */
78
197
  type: PackObjectType;
79
- /** Uncompressed size */
198
+ /** Uncompressed size of the object data in bytes */
80
199
  size: number;
81
- /** Offset in the packfile */
200
+ /** Byte offset where this object starts in the packfile */
82
201
  offset: number;
83
- /** CRC32 of the compressed data */
202
+ /** CRC32 checksum of the compressed object data (header + zlib stream) */
84
203
  crc32: number;
85
204
  }
86
205
  /**
87
- * Parse a pack index file (version 2)
206
+ * Parses a pack index file (version 2 format).
88
207
  *
89
- * @param data - Raw bytes of the .idx file
90
- * @returns Parsed pack index structure
91
- * @throws Error if the index is invalid or uses unsupported version
208
+ * @description Parses the binary .idx file format and returns a structured
209
+ * representation of the pack index. The function validates:
210
+ * - Magic number and version
211
+ * - Fanout table monotonicity
212
+ * - Index checksum integrity
213
+ *
214
+ * **Performance:** This function parses the entire index into memory,
215
+ * which is suitable for most use cases. For very large indexes,
216
+ * consider streaming approaches.
217
+ *
218
+ * @param {Uint8Array} data - Raw bytes of the .idx file
219
+ * @returns {PackIndex} Fully parsed pack index structure
220
+ * @throws {Error} If the index data is too short
221
+ * @throws {Error} If the magic signature is invalid
222
+ * @throws {Error} If the version is not 2
223
+ * @throws {Error} If the fanout table is not monotonically non-decreasing
224
+ * @throws {Error} If the checksum verification fails
225
+ *
226
+ * @example
227
+ * // Parse an index file
228
+ * const indexData = await fs.readFile('pack-abc123.idx');
229
+ * const index = parsePackIndex(indexData);
230
+ *
231
+ * console.log(`Version: ${index.version}`);
232
+ * console.log(`Objects: ${index.objectCount}`);
233
+ *
234
+ * // Access entries
235
+ * for (const entry of index.entries) {
236
+ * console.log(`${entry.objectId} at offset ${entry.offset}`);
237
+ * }
92
238
  */
93
239
  export declare function parsePackIndex(data: Uint8Array): PackIndex;
94
240
  /**
95
- * Create a pack index from a packfile
241
+ * Creates a pack index file from packfile data or pre-computed entries.
242
+ *
243
+ * @description Generates a valid .idx file that can be used to efficiently
244
+ * locate objects within the corresponding packfile. Supports two calling conventions
245
+ * for backward compatibility.
246
+ *
247
+ * **Generated Index Structure:**
248
+ * - Version 2 header with magic number
249
+ * - Fanout table computed from entry SHA prefixes
250
+ * - Sorted object IDs (binary SHA-1)
251
+ * - CRC32 checksums from entries
252
+ * - Pack file offsets (4-byte or 8-byte for large files)
253
+ * - Pack checksum (from pack trailer)
254
+ * - Self-checksum (SHA-1 of entire index)
255
+ *
256
+ * @param {CreatePackIndexOptions | Uint8Array} optionsOrPackData - Either options object or packfile data (legacy)
257
+ * @param {PackIndexEntry[]} [legacyEntries] - Pre-computed entries when using legacy calling convention
258
+ * @returns {Uint8Array} Complete .idx file as binary data
96
259
  *
97
- * Supports two calling conventions:
98
- * - createPackIndex(options: CreatePackIndexOptions) - new style
99
- * - createPackIndex(packData: Uint8Array, entries: PackIndexEntry[]) - legacy style
260
+ * @example
261
+ * // New style: from options
262
+ * const indexData = createPackIndex({ packData: myPackfile });
100
263
  *
101
- * @returns The raw bytes of the generated .idx file
264
+ * @example
265
+ * // Legacy style: with pre-computed entries
266
+ * const entries = [
267
+ * { objectId: 'abc123...', crc32: 0x12345678, offset: 100 }
268
+ * ];
269
+ * const indexData = createPackIndex(packData, entries);
270
+ *
271
+ * @example
272
+ * // Write index to disk alongside packfile
273
+ * const packName = 'pack-abc123';
274
+ * await fs.writeFile(`${packName}.pack`, packData);
275
+ * await fs.writeFile(`${packName}.idx`, createPackIndex({ packData }));
102
276
  */
103
277
  export declare function createPackIndex(optionsOrPackData: CreatePackIndexOptions | Uint8Array, legacyEntries?: PackIndexEntry[]): Uint8Array;
104
278
  /**
105
- * Look up an object in the pack index by its SHA
279
+ * Looks up an object in the pack index by its SHA-1 hash.
280
+ *
281
+ * @description Performs an efficient O(log n) lookup using the fanout table
282
+ * to narrow the search range, followed by binary search within that range.
283
+ *
284
+ * **Algorithm:**
285
+ * 1. Use the first byte of the SHA to find the range via fanout table - O(1)
286
+ * 2. Binary search within the range for exact match - O(log n)
287
+ *
288
+ * **Validation:**
289
+ * - SHA must be exactly 40 characters
290
+ * - SHA must contain valid hexadecimal characters
291
+ * - Comparison is case-insensitive
292
+ *
293
+ * @param {PackIndex} index - The parsed pack index to search
294
+ * @param {string} sha - The 40-character hexadecimal SHA-1 to find
295
+ * @returns {PackIndexEntry | null} The entry if found, or null if not present
296
+ * @throws {Error} If SHA is not exactly 40 characters
297
+ * @throws {Error} If SHA contains no valid hex characters
106
298
  *
107
- * Uses binary search through the fanout table for efficient lookup.
299
+ * @example
300
+ * // Look up an object
301
+ * const entry = lookupObject(index, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3');
302
+ * if (entry) {
303
+ * console.log(`Found at offset ${entry.offset}`);
304
+ * } else {
305
+ * console.log('Object not in this pack');
306
+ * }
108
307
  *
109
- * @param index - The parsed pack index
110
- * @param sha - The 40-character hex SHA to find
111
- * @returns The entry if found, or null if not found
308
+ * @example
309
+ * // With error handling
310
+ * try {
311
+ * const entry = lookupObject(index, userInputSha);
312
+ * } catch (e) {
313
+ * console.error('Invalid SHA format:', e.message);
314
+ * }
112
315
  */
113
316
  export declare function lookupObject(index: PackIndex, sha: string): PackIndexEntry | null;
114
317
  /**
115
- * Verify the integrity of a pack index
318
+ * Verifies the integrity of a pack index file.
116
319
  *
117
- * Checks:
118
- * - Magic number and version
119
- * - Fanout table consistency
120
- * - Object ID sorting
121
- * - SHA-1 checksums
320
+ * @description Performs comprehensive validation of a .idx file including:
321
+ * - Magic number verification (0xff744f63)
322
+ * - Version validation (must be 2)
323
+ * - Fanout table monotonicity check
324
+ * - Object ID sort order verification
325
+ * - SHA-1 checksum validation
326
+ *
327
+ * **Validation Order:**
328
+ * The function validates structural integrity before checking the checksum,
329
+ * allowing it to report more specific errors for corrupted data.
330
+ *
331
+ * @param {Uint8Array} data - Raw bytes of the .idx file
332
+ * @returns {boolean} True if all validation checks pass
333
+ * @throws {Error} If the index is too short
334
+ * @throws {Error} If the magic signature is invalid
335
+ * @throws {Error} If the version is not 2
336
+ * @throws {Error} If the fanout table is not monotonically non-decreasing
337
+ * @throws {Error} If object IDs are not in sorted order
338
+ * @throws {Error} If the checksum doesn't match
339
+ *
340
+ * @example
341
+ * // Verify before using an index
342
+ * try {
343
+ * if (verifyPackIndex(indexData)) {
344
+ * const index = parsePackIndex(indexData);
345
+ * // Safe to use index
346
+ * }
347
+ * } catch (e) {
348
+ * console.error('Corrupted index:', e.message);
349
+ * }
122
350
  *
123
- * @param data - Raw bytes of the .idx file
124
- * @returns True if the index is valid
125
- * @throws Error with details if verification fails
351
+ * @example
352
+ * // Quick validation check
353
+ * const isValid = (() => {
354
+ * try { return verifyPackIndex(data); }
355
+ * catch { return false; }
356
+ * })();
126
357
  */
127
358
  export declare function verifyPackIndex(data: Uint8Array): boolean;
128
359
  /**
129
- * Get the range of entries in the fanout table for a given first byte
360
+ * Gets the range of entries that could match a given first byte.
130
361
  *
131
- * @param fanout - The fanout table
132
- * @param firstByte - The first byte of the object ID (0-255)
133
- * @returns Start and end indices for binary search
362
+ * @description Uses the fanout table to find the start and end indices
363
+ * for objects whose SHA-1 begins with the specified byte value. This
364
+ * is used to narrow the search space before binary searching.
365
+ *
366
+ * The fanout table stores cumulative counts, so:
367
+ * - `fanout[i]` = count of all objects with first byte <= i
368
+ * - Range for byte `b` is [fanout[b-1], fanout[b])
369
+ * - For byte 0, range is [0, fanout[0])
370
+ *
371
+ * @param {Uint32Array} fanout - The 256-entry fanout table
372
+ * @param {number} firstByte - The first byte of the object ID (0-255)
373
+ * @returns {{ start: number; end: number }} Start (inclusive) and end (exclusive) indices
374
+ *
375
+ * @example
376
+ * // Find range for objects starting with 0xab
377
+ * const { start, end } = getFanoutRange(index.fanout, 0xab);
378
+ * // Now binary search entries[start..end)
134
379
  */
135
380
  export declare function getFanoutRange(fanout: Uint32Array, firstByte: number): {
136
381
  start: number;
137
382
  end: number;
138
383
  };
139
384
  /**
140
- * Calculate CRC32 checksum for packed object data
385
+ * Calculates the CRC32 checksum of data.
386
+ *
387
+ * @description Computes a CRC32 checksum using the IEEE 802.3 polynomial,
388
+ * which is the same algorithm used by Git for pack index verification.
389
+ * This checksum is stored in the pack index to verify object integrity
390
+ * without full decompression.
391
+ *
392
+ * @param {Uint8Array} data - The data to checksum (typically compressed object data)
393
+ * @returns {number} 32-bit unsigned CRC32 checksum
141
394
  *
142
- * @param data - The compressed object data
143
- * @returns CRC32 checksum
395
+ * @example
396
+ * // Calculate CRC32 of compressed data
397
+ * const compressed = pako.deflate(objectData);
398
+ * const crc = calculateCRC32(compressed);
399
+ * // Store crc in pack index entry
144
400
  */
145
401
  export declare function calculateCRC32(data: Uint8Array): number;
146
402
  /**
147
- * Binary search for an object ID within a range of the index
403
+ * Performs binary search for an object ID within a range of entries.
148
404
  *
149
- * @param entries - Sorted array of pack index entries
150
- * @param objectId - Object ID (SHA) to search for
151
- * @param start - Start index (inclusive)
152
- * @param end - End index (exclusive)
153
- * @returns Index if found, or -1
405
+ * @description Searches for an exact match of the object ID within the
406
+ * specified range of the sorted entries array. Uses string comparison
407
+ * which works correctly for hexadecimal SHA-1 hashes.
408
+ *
409
+ * **Time Complexity:** O(log n) where n = end - start
410
+ *
411
+ * @param {PackIndexEntry[]} entries - Sorted array of pack index entries
412
+ * @param {string} objectId - 40-character hex object ID (SHA) to search for
413
+ * @param {number} start - Start index (inclusive)
414
+ * @param {number} end - End index (exclusive)
415
+ * @returns {number} Index of the entry if found, or -1 if not found
416
+ *
417
+ * @example
418
+ * // Search within a specific range (from fanout lookup)
419
+ * const { start, end } = getFanoutRange(index.fanout, 0xab);
420
+ * const position = binarySearchObjectId(index.entries, targetSha, start, end);
421
+ * if (position !== -1) {
422
+ * const entry = index.entries[position];
423
+ * }
154
424
  */
155
425
  export declare function binarySearchObjectId(entries: PackIndexEntry[], objectId: string, start: number, end: number): number;
426
+ /**
427
+ * Alias for {@link binarySearchObjectId} for backward compatibility.
428
+ * @deprecated Use binarySearchObjectId instead
429
+ */
156
430
  export declare const binarySearchSha: typeof binarySearchObjectId;
157
431
  /**
158
- * Serialize a pack index to binary format
432
+ * Serializes a PackIndex structure to binary .idx format.
433
+ *
434
+ * @description Converts a structured PackIndex object into the binary format
435
+ * used by Git for .idx files. This is the inverse of {@link parsePackIndex}.
436
+ *
437
+ * **Output Structure:**
438
+ * 1. Magic number (4 bytes)
439
+ * 2. Version (4 bytes)
440
+ * 3. Fanout table (1024 bytes)
441
+ * 4. Object IDs sorted (N * 20 bytes)
442
+ * 5. CRC32 values (N * 4 bytes)
443
+ * 6. 4-byte offsets (N * 4 bytes)
444
+ * 7. 8-byte large offsets if needed
445
+ * 8. Pack checksum (20 bytes)
446
+ * 9. Index checksum (20 bytes) - computed during serialization
159
447
  *
160
- * @param index - The pack index to serialize
161
- * @returns Raw bytes of the .idx file
448
+ * @param {PackIndex} index - The pack index to serialize
449
+ * @returns {Uint8Array} Complete .idx file as binary data
450
+ *
451
+ * @example
452
+ * // Serialize an index after modifications
453
+ * const index = parsePackIndex(originalData);
454
+ * // ... modify index ...
455
+ * const newData = serializePackIndex(index);
162
456
  */
163
457
  export declare function serializePackIndex(index: PackIndex): Uint8Array;
164
458
  /**
165
- * Parse the fanout table from pack index data
459
+ * Parses the 256-entry fanout table from pack index data.
460
+ *
461
+ * @description The fanout table is a core data structure that enables O(1)
462
+ * range lookup for binary search. Each entry stores the cumulative count
463
+ * of objects whose first SHA byte is <= the entry index.
166
464
  *
167
- * @param data - Raw bytes starting at fanout table
168
- * @returns Parsed fanout table (256 entries)
465
+ * **Table Properties:**
466
+ * - 256 entries (one per possible first byte value)
467
+ * - Each entry is 4 bytes, big-endian
468
+ * - Values must be monotonically non-decreasing
469
+ * - fanout[255] = total object count
470
+ *
471
+ * @param {Uint8Array} data - Raw bytes starting at the fanout table (1024 bytes minimum)
472
+ * @returns {Uint32Array} 256-entry fanout table
473
+ *
474
+ * @example
475
+ * // Parse fanout from index data
476
+ * const fanoutData = indexData.subarray(8, 8 + 256 * 4);
477
+ * const fanout = parseFanoutTable(fanoutData);
478
+ * const totalObjects = fanout[255];
169
479
  */
170
480
  export declare function parseFanoutTable(data: Uint8Array): Uint32Array;
171
481
  /**
172
- * Read a 4-byte big-endian offset from pack index
482
+ * Reads a pack file offset from the index, handling both small and large offsets.
483
+ *
484
+ * @description Pack index offsets use a special encoding to support files > 2GB:
485
+ * - If MSB is clear: the 4-byte value is the direct offset
486
+ * - If MSB is set: the lower 31 bits are an index into the large offset table
487
+ *
488
+ * The large offset table stores 8-byte offsets for objects beyond the 2GB boundary.
173
489
  *
174
- * If the MSB is set, it's an index into the large offset table.
490
+ * @param {Uint8Array} data - 4 bytes containing the offset or large offset index
491
+ * @param {Uint8Array} [largeOffsets] - The 8-byte large offset table (required for offsets > 2GB)
492
+ * @returns {number} The actual byte offset in the packfile
493
+ * @throws {Error} If a large offset is indicated but largeOffsets is not provided
494
+ * @throws {Error} If the large offset index is out of bounds
175
495
  *
176
- * @param data - Raw bytes at offset position
177
- * @param largeOffsets - Large offset table (for >2GB offsets)
178
- * @returns The actual offset value
496
+ * @example
497
+ * // Read offset for an entry
498
+ * const offsetData = indexData.subarray(offsetsStart + i * 4, offsetsStart + (i + 1) * 4);
499
+ * const offset = readPackOffset(offsetData, largeOffsetsTable);
179
500
  */
180
501
  export declare function readPackOffset(data: Uint8Array, largeOffsets?: Uint8Array): number;
181
502
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pack/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,E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