gitx.do 0.1.1 → 0.1.2

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 (356) hide show
  1. package/README.md +40 -353
  2. package/dist/do/logger.d.ts +50 -0
  3. package/dist/do/logger.d.ts.map +1 -0
  4. package/dist/do/logger.js +122 -0
  5. package/dist/do/logger.js.map +1 -0
  6. package/dist/{durable-object → do}/schema.d.ts +3 -3
  7. package/dist/do/schema.d.ts.map +1 -0
  8. package/dist/{durable-object → do}/schema.js +4 -3
  9. package/dist/do/schema.js.map +1 -0
  10. package/dist/do/types.d.ts +267 -0
  11. package/dist/do/types.d.ts.map +1 -0
  12. package/dist/do/types.js +62 -0
  13. package/dist/do/types.js.map +1 -0
  14. package/dist/index.d.ts +14 -469
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +31 -483
  17. package/dist/index.js.map +1 -1
  18. package/package.json +13 -21
  19. package/dist/cli/commands/add.d.ts +0 -176
  20. package/dist/cli/commands/add.d.ts.map +0 -1
  21. package/dist/cli/commands/add.js +0 -979
  22. package/dist/cli/commands/add.js.map +0 -1
  23. package/dist/cli/commands/blame.d.ts +0 -259
  24. package/dist/cli/commands/blame.d.ts.map +0 -1
  25. package/dist/cli/commands/blame.js +0 -609
  26. package/dist/cli/commands/blame.js.map +0 -1
  27. package/dist/cli/commands/branch.d.ts +0 -249
  28. package/dist/cli/commands/branch.d.ts.map +0 -1
  29. package/dist/cli/commands/branch.js +0 -693
  30. package/dist/cli/commands/branch.js.map +0 -1
  31. package/dist/cli/commands/checkout.d.ts +0 -73
  32. package/dist/cli/commands/checkout.d.ts.map +0 -1
  33. package/dist/cli/commands/checkout.js +0 -725
  34. package/dist/cli/commands/checkout.js.map +0 -1
  35. package/dist/cli/commands/commit.d.ts +0 -182
  36. package/dist/cli/commands/commit.d.ts.map +0 -1
  37. package/dist/cli/commands/commit.js +0 -457
  38. package/dist/cli/commands/commit.js.map +0 -1
  39. package/dist/cli/commands/diff.d.ts +0 -464
  40. package/dist/cli/commands/diff.d.ts.map +0 -1
  41. package/dist/cli/commands/diff.js +0 -959
  42. package/dist/cli/commands/diff.js.map +0 -1
  43. package/dist/cli/commands/log.d.ts +0 -239
  44. package/dist/cli/commands/log.d.ts.map +0 -1
  45. package/dist/cli/commands/log.js +0 -535
  46. package/dist/cli/commands/log.js.map +0 -1
  47. package/dist/cli/commands/merge.d.ts +0 -106
  48. package/dist/cli/commands/merge.d.ts.map +0 -1
  49. package/dist/cli/commands/merge.js +0 -852
  50. package/dist/cli/commands/merge.js.map +0 -1
  51. package/dist/cli/commands/review.d.ts +0 -457
  52. package/dist/cli/commands/review.d.ts.map +0 -1
  53. package/dist/cli/commands/review.js +0 -558
  54. package/dist/cli/commands/review.js.map +0 -1
  55. package/dist/cli/commands/stash.d.ts +0 -157
  56. package/dist/cli/commands/stash.d.ts.map +0 -1
  57. package/dist/cli/commands/stash.js +0 -655
  58. package/dist/cli/commands/stash.js.map +0 -1
  59. package/dist/cli/commands/status.d.ts +0 -269
  60. package/dist/cli/commands/status.d.ts.map +0 -1
  61. package/dist/cli/commands/status.js +0 -492
  62. package/dist/cli/commands/status.js.map +0 -1
  63. package/dist/cli/commands/web.d.ts +0 -199
  64. package/dist/cli/commands/web.d.ts.map +0 -1
  65. package/dist/cli/commands/web.js +0 -697
  66. package/dist/cli/commands/web.js.map +0 -1
  67. package/dist/cli/fs-adapter.d.ts +0 -656
  68. package/dist/cli/fs-adapter.d.ts.map +0 -1
  69. package/dist/cli/fs-adapter.js +0 -1177
  70. package/dist/cli/fs-adapter.js.map +0 -1
  71. package/dist/cli/fsx-cli-adapter.d.ts +0 -359
  72. package/dist/cli/fsx-cli-adapter.d.ts.map +0 -1
  73. package/dist/cli/fsx-cli-adapter.js +0 -619
  74. package/dist/cli/fsx-cli-adapter.js.map +0 -1
  75. package/dist/cli/index.d.ts +0 -387
  76. package/dist/cli/index.d.ts.map +0 -1
  77. package/dist/cli/index.js +0 -579
  78. package/dist/cli/index.js.map +0 -1
  79. package/dist/cli/ui/components/DiffView.d.ts +0 -12
  80. package/dist/cli/ui/components/DiffView.d.ts.map +0 -1
  81. package/dist/cli/ui/components/DiffView.js +0 -11
  82. package/dist/cli/ui/components/DiffView.js.map +0 -1
  83. package/dist/cli/ui/components/ErrorDisplay.d.ts +0 -10
  84. package/dist/cli/ui/components/ErrorDisplay.d.ts.map +0 -1
  85. package/dist/cli/ui/components/ErrorDisplay.js +0 -11
  86. package/dist/cli/ui/components/ErrorDisplay.js.map +0 -1
  87. package/dist/cli/ui/components/FuzzySearch.d.ts +0 -15
  88. package/dist/cli/ui/components/FuzzySearch.d.ts.map +0 -1
  89. package/dist/cli/ui/components/FuzzySearch.js +0 -12
  90. package/dist/cli/ui/components/FuzzySearch.js.map +0 -1
  91. package/dist/cli/ui/components/LoadingSpinner.d.ts +0 -10
  92. package/dist/cli/ui/components/LoadingSpinner.d.ts.map +0 -1
  93. package/dist/cli/ui/components/LoadingSpinner.js +0 -10
  94. package/dist/cli/ui/components/LoadingSpinner.js.map +0 -1
  95. package/dist/cli/ui/components/NavigationList.d.ts +0 -14
  96. package/dist/cli/ui/components/NavigationList.d.ts.map +0 -1
  97. package/dist/cli/ui/components/NavigationList.js +0 -11
  98. package/dist/cli/ui/components/NavigationList.js.map +0 -1
  99. package/dist/cli/ui/components/ScrollableContent.d.ts +0 -13
  100. package/dist/cli/ui/components/ScrollableContent.d.ts.map +0 -1
  101. package/dist/cli/ui/components/ScrollableContent.js +0 -11
  102. package/dist/cli/ui/components/ScrollableContent.js.map +0 -1
  103. package/dist/cli/ui/components/index.d.ts +0 -7
  104. package/dist/cli/ui/components/index.d.ts.map +0 -1
  105. package/dist/cli/ui/components/index.js +0 -9
  106. package/dist/cli/ui/components/index.js.map +0 -1
  107. package/dist/cli/ui/terminal-ui.d.ts +0 -85
  108. package/dist/cli/ui/terminal-ui.d.ts.map +0 -1
  109. package/dist/cli/ui/terminal-ui.js +0 -121
  110. package/dist/cli/ui/terminal-ui.js.map +0 -1
  111. package/dist/do/BashModule.d.ts +0 -871
  112. package/dist/do/BashModule.d.ts.map +0 -1
  113. package/dist/do/BashModule.js +0 -1143
  114. package/dist/do/BashModule.js.map +0 -1
  115. package/dist/do/FsModule.d.ts +0 -612
  116. package/dist/do/FsModule.d.ts.map +0 -1
  117. package/dist/do/FsModule.js +0 -1120
  118. package/dist/do/FsModule.js.map +0 -1
  119. package/dist/do/GitModule.d.ts +0 -635
  120. package/dist/do/GitModule.d.ts.map +0 -1
  121. package/dist/do/GitModule.js +0 -784
  122. package/dist/do/GitModule.js.map +0 -1
  123. package/dist/do/GitRepoDO.d.ts +0 -281
  124. package/dist/do/GitRepoDO.d.ts.map +0 -1
  125. package/dist/do/GitRepoDO.js +0 -479
  126. package/dist/do/GitRepoDO.js.map +0 -1
  127. package/dist/do/bash-ast.d.ts +0 -246
  128. package/dist/do/bash-ast.d.ts.map +0 -1
  129. package/dist/do/bash-ast.js +0 -888
  130. package/dist/do/bash-ast.js.map +0 -1
  131. package/dist/do/container-executor.d.ts +0 -491
  132. package/dist/do/container-executor.d.ts.map +0 -1
  133. package/dist/do/container-executor.js +0 -731
  134. package/dist/do/container-executor.js.map +0 -1
  135. package/dist/do/index.d.ts +0 -53
  136. package/dist/do/index.d.ts.map +0 -1
  137. package/dist/do/index.js +0 -91
  138. package/dist/do/index.js.map +0 -1
  139. package/dist/do/tiered-storage.d.ts +0 -403
  140. package/dist/do/tiered-storage.d.ts.map +0 -1
  141. package/dist/do/tiered-storage.js +0 -689
  142. package/dist/do/tiered-storage.js.map +0 -1
  143. package/dist/do/withBash.d.ts +0 -231
  144. package/dist/do/withBash.d.ts.map +0 -1
  145. package/dist/do/withBash.js +0 -244
  146. package/dist/do/withBash.js.map +0 -1
  147. package/dist/do/withFs.d.ts +0 -237
  148. package/dist/do/withFs.d.ts.map +0 -1
  149. package/dist/do/withFs.js +0 -387
  150. package/dist/do/withFs.js.map +0 -1
  151. package/dist/do/withGit.d.ts +0 -180
  152. package/dist/do/withGit.d.ts.map +0 -1
  153. package/dist/do/withGit.js +0 -271
  154. package/dist/do/withGit.js.map +0 -1
  155. package/dist/durable-object/object-store.d.ts +0 -633
  156. package/dist/durable-object/object-store.d.ts.map +0 -1
  157. package/dist/durable-object/object-store.js +0 -1164
  158. package/dist/durable-object/object-store.js.map +0 -1
  159. package/dist/durable-object/schema.d.ts.map +0 -1
  160. package/dist/durable-object/schema.js.map +0 -1
  161. package/dist/durable-object/wal.d.ts +0 -416
  162. package/dist/durable-object/wal.d.ts.map +0 -1
  163. package/dist/durable-object/wal.js +0 -445
  164. package/dist/durable-object/wal.js.map +0 -1
  165. package/dist/mcp/adapter.d.ts +0 -772
  166. package/dist/mcp/adapter.d.ts.map +0 -1
  167. package/dist/mcp/adapter.js +0 -895
  168. package/dist/mcp/adapter.js.map +0 -1
  169. package/dist/mcp/sandbox/miniflare-evaluator.d.ts +0 -22
  170. package/dist/mcp/sandbox/miniflare-evaluator.d.ts.map +0 -1
  171. package/dist/mcp/sandbox/miniflare-evaluator.js +0 -140
  172. package/dist/mcp/sandbox/miniflare-evaluator.js.map +0 -1
  173. package/dist/mcp/sandbox/object-store-proxy.d.ts +0 -32
  174. package/dist/mcp/sandbox/object-store-proxy.d.ts.map +0 -1
  175. package/dist/mcp/sandbox/object-store-proxy.js +0 -30
  176. package/dist/mcp/sandbox/object-store-proxy.js.map +0 -1
  177. package/dist/mcp/sandbox/template.d.ts +0 -17
  178. package/dist/mcp/sandbox/template.d.ts.map +0 -1
  179. package/dist/mcp/sandbox/template.js +0 -71
  180. package/dist/mcp/sandbox/template.js.map +0 -1
  181. package/dist/mcp/sandbox.d.ts +0 -764
  182. package/dist/mcp/sandbox.d.ts.map +0 -1
  183. package/dist/mcp/sandbox.js +0 -1362
  184. package/dist/mcp/sandbox.js.map +0 -1
  185. package/dist/mcp/sdk-adapter.d.ts +0 -835
  186. package/dist/mcp/sdk-adapter.d.ts.map +0 -1
  187. package/dist/mcp/sdk-adapter.js +0 -974
  188. package/dist/mcp/sdk-adapter.js.map +0 -1
  189. package/dist/mcp/tools/do.d.ts +0 -32
  190. package/dist/mcp/tools/do.d.ts.map +0 -1
  191. package/dist/mcp/tools/do.js +0 -117
  192. package/dist/mcp/tools/do.js.map +0 -1
  193. package/dist/mcp/tools.d.ts +0 -548
  194. package/dist/mcp/tools.d.ts.map +0 -1
  195. package/dist/mcp/tools.js +0 -3170
  196. package/dist/mcp/tools.js.map +0 -1
  197. package/dist/ops/blame.d.ts +0 -551
  198. package/dist/ops/blame.d.ts.map +0 -1
  199. package/dist/ops/blame.js +0 -1037
  200. package/dist/ops/blame.js.map +0 -1
  201. package/dist/ops/branch.d.ts +0 -766
  202. package/dist/ops/branch.d.ts.map +0 -1
  203. package/dist/ops/branch.js +0 -950
  204. package/dist/ops/branch.js.map +0 -1
  205. package/dist/ops/commit-traversal.d.ts +0 -349
  206. package/dist/ops/commit-traversal.d.ts.map +0 -1
  207. package/dist/ops/commit-traversal.js +0 -821
  208. package/dist/ops/commit-traversal.js.map +0 -1
  209. package/dist/ops/commit.d.ts +0 -555
  210. package/dist/ops/commit.d.ts.map +0 -1
  211. package/dist/ops/commit.js +0 -826
  212. package/dist/ops/commit.js.map +0 -1
  213. package/dist/ops/merge-base.d.ts +0 -397
  214. package/dist/ops/merge-base.d.ts.map +0 -1
  215. package/dist/ops/merge-base.js +0 -691
  216. package/dist/ops/merge-base.js.map +0 -1
  217. package/dist/ops/merge.d.ts +0 -855
  218. package/dist/ops/merge.d.ts.map +0 -1
  219. package/dist/ops/merge.js +0 -1551
  220. package/dist/ops/merge.js.map +0 -1
  221. package/dist/ops/tag.d.ts +0 -247
  222. package/dist/ops/tag.d.ts.map +0 -1
  223. package/dist/ops/tag.js +0 -649
  224. package/dist/ops/tag.js.map +0 -1
  225. package/dist/ops/tree-builder.d.ts +0 -178
  226. package/dist/ops/tree-builder.d.ts.map +0 -1
  227. package/dist/ops/tree-builder.js +0 -271
  228. package/dist/ops/tree-builder.js.map +0 -1
  229. package/dist/ops/tree-diff.d.ts +0 -291
  230. package/dist/ops/tree-diff.d.ts.map +0 -1
  231. package/dist/ops/tree-diff.js +0 -705
  232. package/dist/ops/tree-diff.js.map +0 -1
  233. package/dist/pack/delta.d.ts +0 -248
  234. package/dist/pack/delta.d.ts.map +0 -1
  235. package/dist/pack/delta.js +0 -740
  236. package/dist/pack/delta.js.map +0 -1
  237. package/dist/pack/format.d.ts +0 -446
  238. package/dist/pack/format.d.ts.map +0 -1
  239. package/dist/pack/format.js +0 -572
  240. package/dist/pack/format.js.map +0 -1
  241. package/dist/pack/full-generation.d.ts +0 -612
  242. package/dist/pack/full-generation.d.ts.map +0 -1
  243. package/dist/pack/full-generation.js +0 -1378
  244. package/dist/pack/full-generation.js.map +0 -1
  245. package/dist/pack/generation.d.ts +0 -441
  246. package/dist/pack/generation.d.ts.map +0 -1
  247. package/dist/pack/generation.js +0 -707
  248. package/dist/pack/generation.js.map +0 -1
  249. package/dist/pack/index.d.ts +0 -502
  250. package/dist/pack/index.d.ts.map +0 -1
  251. package/dist/pack/index.js +0 -833
  252. package/dist/pack/index.js.map +0 -1
  253. package/dist/refs/branch.d.ts +0 -683
  254. package/dist/refs/branch.d.ts.map +0 -1
  255. package/dist/refs/branch.js +0 -881
  256. package/dist/refs/branch.js.map +0 -1
  257. package/dist/refs/storage.d.ts +0 -833
  258. package/dist/refs/storage.d.ts.map +0 -1
  259. package/dist/refs/storage.js +0 -1023
  260. package/dist/refs/storage.js.map +0 -1
  261. package/dist/refs/tag.d.ts +0 -860
  262. package/dist/refs/tag.d.ts.map +0 -1
  263. package/dist/refs/tag.js +0 -996
  264. package/dist/refs/tag.js.map +0 -1
  265. package/dist/storage/backend.d.ts +0 -425
  266. package/dist/storage/backend.d.ts.map +0 -1
  267. package/dist/storage/backend.js +0 -41
  268. package/dist/storage/backend.js.map +0 -1
  269. package/dist/storage/fsx-adapter.d.ts +0 -204
  270. package/dist/storage/fsx-adapter.d.ts.map +0 -1
  271. package/dist/storage/fsx-adapter.js +0 -518
  272. package/dist/storage/fsx-adapter.js.map +0 -1
  273. package/dist/storage/lru-cache.d.ts +0 -691
  274. package/dist/storage/lru-cache.d.ts.map +0 -1
  275. package/dist/storage/lru-cache.js +0 -813
  276. package/dist/storage/lru-cache.js.map +0 -1
  277. package/dist/storage/object-index.d.ts +0 -585
  278. package/dist/storage/object-index.d.ts.map +0 -1
  279. package/dist/storage/object-index.js +0 -532
  280. package/dist/storage/object-index.js.map +0 -1
  281. package/dist/storage/r2-pack.d.ts +0 -1257
  282. package/dist/storage/r2-pack.d.ts.map +0 -1
  283. package/dist/storage/r2-pack.js +0 -1773
  284. package/dist/storage/r2-pack.js.map +0 -1
  285. package/dist/tiered/cdc-pipeline.d.ts +0 -1888
  286. package/dist/tiered/cdc-pipeline.d.ts.map +0 -1
  287. package/dist/tiered/cdc-pipeline.js +0 -1880
  288. package/dist/tiered/cdc-pipeline.js.map +0 -1
  289. package/dist/tiered/migration.d.ts +0 -1104
  290. package/dist/tiered/migration.d.ts.map +0 -1
  291. package/dist/tiered/migration.js +0 -1217
  292. package/dist/tiered/migration.js.map +0 -1
  293. package/dist/tiered/parquet-writer.d.ts +0 -1145
  294. package/dist/tiered/parquet-writer.d.ts.map +0 -1
  295. package/dist/tiered/parquet-writer.js +0 -1183
  296. package/dist/tiered/parquet-writer.js.map +0 -1
  297. package/dist/tiered/read-path.d.ts +0 -835
  298. package/dist/tiered/read-path.d.ts.map +0 -1
  299. package/dist/tiered/read-path.js +0 -487
  300. package/dist/tiered/read-path.js.map +0 -1
  301. package/dist/types/capability.d.ts +0 -1385
  302. package/dist/types/capability.d.ts.map +0 -1
  303. package/dist/types/capability.js +0 -36
  304. package/dist/types/capability.js.map +0 -1
  305. package/dist/types/index.d.ts +0 -13
  306. package/dist/types/index.d.ts.map +0 -1
  307. package/dist/types/index.js +0 -18
  308. package/dist/types/index.js.map +0 -1
  309. package/dist/types/interfaces.d.ts +0 -673
  310. package/dist/types/interfaces.d.ts.map +0 -1
  311. package/dist/types/interfaces.js +0 -26
  312. package/dist/types/interfaces.js.map +0 -1
  313. package/dist/types/objects.d.ts +0 -692
  314. package/dist/types/objects.d.ts.map +0 -1
  315. package/dist/types/objects.js +0 -837
  316. package/dist/types/objects.js.map +0 -1
  317. package/dist/types/storage.d.ts +0 -603
  318. package/dist/types/storage.d.ts.map +0 -1
  319. package/dist/types/storage.js +0 -191
  320. package/dist/types/storage.js.map +0 -1
  321. package/dist/types/worker-loader.d.ts +0 -60
  322. package/dist/types/worker-loader.d.ts.map +0 -1
  323. package/dist/types/worker-loader.js +0 -62
  324. package/dist/types/worker-loader.js.map +0 -1
  325. package/dist/utils/hash.d.ts +0 -198
  326. package/dist/utils/hash.d.ts.map +0 -1
  327. package/dist/utils/hash.js +0 -272
  328. package/dist/utils/hash.js.map +0 -1
  329. package/dist/utils/sha1.d.ts +0 -325
  330. package/dist/utils/sha1.d.ts.map +0 -1
  331. package/dist/utils/sha1.js +0 -635
  332. package/dist/utils/sha1.js.map +0 -1
  333. package/dist/wire/capabilities.d.ts +0 -1044
  334. package/dist/wire/capabilities.d.ts.map +0 -1
  335. package/dist/wire/capabilities.js +0 -941
  336. package/dist/wire/capabilities.js.map +0 -1
  337. package/dist/wire/path-security.d.ts +0 -157
  338. package/dist/wire/path-security.d.ts.map +0 -1
  339. package/dist/wire/path-security.js +0 -307
  340. package/dist/wire/path-security.js.map +0 -1
  341. package/dist/wire/pkt-line.d.ts +0 -345
  342. package/dist/wire/pkt-line.d.ts.map +0 -1
  343. package/dist/wire/pkt-line.js +0 -381
  344. package/dist/wire/pkt-line.js.map +0 -1
  345. package/dist/wire/receive-pack.d.ts +0 -1059
  346. package/dist/wire/receive-pack.d.ts.map +0 -1
  347. package/dist/wire/receive-pack.js +0 -1414
  348. package/dist/wire/receive-pack.js.map +0 -1
  349. package/dist/wire/smart-http.d.ts +0 -799
  350. package/dist/wire/smart-http.d.ts.map +0 -1
  351. package/dist/wire/smart-http.js +0 -945
  352. package/dist/wire/smart-http.js.map +0 -1
  353. package/dist/wire/upload-pack.d.ts +0 -727
  354. package/dist/wire/upload-pack.d.ts.map +0 -1
  355. package/dist/wire/upload-pack.js +0 -1141
  356. package/dist/wire/upload-pack.js.map +0 -1
@@ -1,860 +0,0 @@
1
- /**
2
- * @fileoverview Git Tag Operations
3
- *
4
- * This module provides comprehensive tag management functionality including
5
- * creation (lightweight and annotated), deletion, listing, and verification.
6
- *
7
- * **Tag Types in Git**:
8
- * - **Lightweight tags**: Simple refs under refs/tags/ pointing to commits
9
- * - **Annotated tags**: Refs pointing to tag objects containing metadata
10
- * (tagger, date, message, and optional GPG signature)
11
- *
12
- * Annotated tags are recommended for releases as they include metadata
13
- * and can be cryptographically signed.
14
- *
15
- * @module refs/tag
16
- *
17
- * @example
18
- * ```typescript
19
- * import { TagManager, createTag, listTags } from './refs/tag'
20
- *
21
- * // Create manager
22
- * const manager = new TagManager(refStorage, objectStorage, gpgSigner)
23
- *
24
- * // Create annotated tag
25
- * const tag = await manager.createTag('v1.0.0', commitSha, {
26
- * annotated: true,
27
- * message: 'Release 1.0.0',
28
- * tagger: { name: 'Alice', email: 'alice@example.com', timestamp: Date.now()/1000, timezone: '+0000' }
29
- * })
30
- *
31
- * // List version tags
32
- * const versions = await listTags(manager, { pattern: 'v*' })
33
- * ```
34
- */
35
- import { Author, TagObject, ObjectType } from '../types/objects';
36
- import { RefErrorCode } from './storage';
37
- /**
38
- * Simplified ref storage interface for TagManager.
39
- *
40
- * This interface is a subset of RefStorage that TagManager needs.
41
- * It allows for simpler mocking in tests.
42
- */
43
- export interface TagRefStorage {
44
- getRef(name: string): Promise<string | null>;
45
- setRef(name: string, sha: string): Promise<void>;
46
- deleteRef(name: string): Promise<boolean>;
47
- listRefs(prefix: string): Promise<Array<{
48
- name: string;
49
- sha: string;
50
- }>>;
51
- }
52
- export { RefStorage } from './storage';
53
- /**
54
- * Tag type discriminator.
55
- *
56
- * @description
57
- * - `lightweight`: Simple ref pointing directly to a commit
58
- * - `annotated`: Ref pointing to a tag object containing metadata
59
- */
60
- export type TagType = 'lightweight' | 'annotated';
61
- /**
62
- * Represents a Git tag (either lightweight or annotated).
63
- *
64
- * @description
65
- * Unified interface for both lightweight and annotated tags.
66
- * For annotated tags, includes additional metadata from the tag object.
67
- *
68
- * @example
69
- * ```typescript
70
- * // Lightweight tag
71
- * const light: Tag = {
72
- * name: 'v0.1.0',
73
- * type: 'lightweight',
74
- * sha: 'commitsha...'
75
- * }
76
- *
77
- * // Annotated tag
78
- * const annotated: Tag = {
79
- * name: 'v1.0.0',
80
- * type: 'annotated',
81
- * sha: 'tagobjectsha...',
82
- * targetSha: 'commitsha...',
83
- * targetType: 'commit',
84
- * tagger: { name: 'Alice', email: 'alice@example.com', timestamp: 1704067200, timezone: '+0000' },
85
- * message: 'Release 1.0.0'
86
- * }
87
- * ```
88
- */
89
- export interface Tag {
90
- /** Tag name (e.g., 'v1.0.0') without refs/tags/ prefix */
91
- name: string;
92
- /** Tag type: 'lightweight' or 'annotated' */
93
- type: TagType;
94
- /**
95
- * SHA this ref points to.
96
- * For lightweight tags: commit SHA
97
- * For annotated tags: tag object SHA
98
- */
99
- sha: string;
100
- /**
101
- * For annotated tags: the commit/object the tag points to.
102
- * Undefined for lightweight tags.
103
- */
104
- targetSha?: string;
105
- /**
106
- * For annotated tags: the type of object being tagged.
107
- * Usually 'commit', but could be 'blob', 'tree', or even 'tag'.
108
- */
109
- targetType?: ObjectType;
110
- /**
111
- * For annotated tags: the tagger information.
112
- * Contains name, email, timestamp, and timezone.
113
- */
114
- tagger?: Author;
115
- /**
116
- * For annotated tags: the tag message.
117
- * Can be multi-line with a subject and body.
118
- */
119
- message?: string;
120
- /**
121
- * For signed annotated tags: the GPG signature.
122
- * ASCII-armored GPG signature block.
123
- */
124
- signature?: string;
125
- }
126
- /**
127
- * Options for creating a tag.
128
- *
129
- * @description
130
- * Controls tag creation behavior including whether to create
131
- * an annotated tag, message content, and signing options.
132
- */
133
- export interface CreateTagOptions {
134
- /**
135
- * Create an annotated tag (default: false for lightweight).
136
- * If message is provided, defaults to true.
137
- */
138
- annotated?: boolean;
139
- /**
140
- * Tag message (required for annotated tags unless using empty message).
141
- * Can be multi-line with subject and body separated by blank line.
142
- */
143
- message?: string;
144
- /**
145
- * Tagger information (defaults to configured user).
146
- * Required for annotated tags if no global config is set.
147
- */
148
- tagger?: Author;
149
- /**
150
- * Sign the tag with GPG.
151
- * Requires GPGSigner to be provided to TagManager.
152
- */
153
- sign?: boolean;
154
- /**
155
- * GPG key ID to use for signing.
156
- * Defaults to the user's default signing key.
157
- */
158
- keyId?: string;
159
- /**
160
- * Force overwrite if tag exists.
161
- * Without force, creating an existing tag throws TagError.
162
- */
163
- force?: boolean;
164
- }
165
- /**
166
- * Options for listing tags.
167
- *
168
- * @description
169
- * Provides filtering, sorting, and inclusion options for tag listing.
170
- */
171
- export interface ListTagsOptions {
172
- /**
173
- * Pattern to filter tags (glob-like, e.g., 'v1.*', 'release-*').
174
- * Supports * and ? wildcards.
175
- */
176
- pattern?: string;
177
- /**
178
- * Sort order: 'name', 'version', or 'date'.
179
- * 'version' uses semantic versioning comparison.
180
- * 'date' requires includeMetadata=true for annotated tags.
181
- */
182
- sort?: 'name' | 'version' | 'date';
183
- /** Sort direction: 'asc' or 'desc' */
184
- sortDirection?: 'asc' | 'desc';
185
- /** Maximum number of tags to return */
186
- limit?: number;
187
- /**
188
- * Include annotated tag metadata (tagger, message).
189
- * Slower as it requires reading tag objects.
190
- */
191
- includeMetadata?: boolean;
192
- }
193
- /**
194
- * Options for deleting a tag.
195
- */
196
- export interface DeleteTagOptions {
197
- /**
198
- * Delete even if tag doesn't exist locally.
199
- * Without force, deleting non-existent tag throws TagError.
200
- */
201
- force?: boolean;
202
- }
203
- /**
204
- * Options for getting a tag.
205
- */
206
- export interface GetTagOptions {
207
- /**
208
- * Resolve to get full annotated tag info.
209
- * Reads the tag object to populate tagger, message, etc.
210
- */
211
- resolve?: boolean;
212
- }
213
- /**
214
- * Result of tag signature verification.
215
- *
216
- * @description
217
- * Contains verification status and signer information
218
- * for signed annotated tags.
219
- *
220
- * @example
221
- * ```typescript
222
- * const result = await manager.verifyTag('v1.0.0')
223
- * if (result.valid) {
224
- * console.log(`Signed by: ${result.signer} (${result.keyId})`)
225
- * console.log(`Trust: ${result.trustLevel}`)
226
- * } else {
227
- * console.log(`Verification failed: ${result.error}`)
228
- * }
229
- * ```
230
- */
231
- export interface TagSignatureVerification {
232
- /** Whether the signature is valid */
233
- valid: boolean;
234
- /** GPG key ID used for signing (e.g., '0x1234ABCD') */
235
- keyId?: string;
236
- /** Signer identity from the key */
237
- signer?: string;
238
- /**
239
- * Trust level of the signing key.
240
- * Based on GPG web of trust model.
241
- */
242
- trustLevel?: 'ultimate' | 'full' | 'marginal' | 'never' | 'undefined' | 'expired' | 'unknown';
243
- /** Error message if verification failed */
244
- error?: string;
245
- }
246
- /**
247
- * Error codes specific to tag operations.
248
- *
249
- * @description
250
- * Extends RefErrorCode with tag-specific errors:
251
- * - `TAG_EXISTS`: Tag already exists (when creating without force)
252
- * - `TAG_NOT_FOUND`: Tag doesn't exist
253
- * - `INVALID_TAG_NAME`: Tag name fails validation
254
- * - `MESSAGE_REQUIRED`: Annotated tag requires a message
255
- * - `GPG_ERROR`: GPG signing or verification failed
256
- */
257
- export type TagErrorCode = RefErrorCode | 'TAG_EXISTS' | 'TAG_NOT_FOUND' | 'INVALID_TAG_NAME' | 'MESSAGE_REQUIRED' | 'GPG_ERROR';
258
- /**
259
- * Error thrown when a tag operation fails.
260
- *
261
- * @description
262
- * Provides structured error information with error code
263
- * for programmatic error handling.
264
- *
265
- * @example
266
- * ```typescript
267
- * try {
268
- * await manager.createTag('v1.0.0', 'abc123')
269
- * } catch (e) {
270
- * if (e instanceof TagError) {
271
- * switch (e.code) {
272
- * case 'TAG_EXISTS':
273
- * console.log('Tag already exists, use force=true to overwrite')
274
- * break
275
- * case 'MESSAGE_REQUIRED':
276
- * console.log('Annotated tags require a message')
277
- * break
278
- * }
279
- * }
280
- * }
281
- * ```
282
- */
283
- export declare class TagError extends Error {
284
- readonly code: TagErrorCode;
285
- readonly tagName?: string | undefined;
286
- /**
287
- * Create a new TagError.
288
- *
289
- * @param message - Human-readable error description
290
- * @param code - Error code for programmatic handling
291
- * @param tagName - The tag that caused the error (optional)
292
- */
293
- constructor(message: string, code: TagErrorCode, tagName?: string | undefined);
294
- }
295
- /**
296
- * Storage backend interface for tag objects.
297
- *
298
- * @description
299
- * Interface for reading and writing tag objects.
300
- * Used by TagManager for annotated tag operations.
301
- */
302
- export interface TagObjectStorage {
303
- /**
304
- * Read a tag object by SHA.
305
- *
306
- * @param sha - 40-character SHA-1 of the tag object
307
- * @returns Parsed TagObject or null if not found
308
- */
309
- readTagObject(sha: string): Promise<TagObject | null>;
310
- /**
311
- * Write a tag object and return its SHA.
312
- *
313
- * @param tag - Tag object data (without type and data fields)
314
- * @returns 40-character SHA-1 of the stored tag object
315
- */
316
- writeTagObject(tag: Omit<TagObject, 'type' | 'data'>): Promise<string>;
317
- /**
318
- * Read any object to determine its type.
319
- *
320
- * @param sha - 40-character SHA-1 of the object
321
- * @returns Object type or null if not found
322
- */
323
- readObjectType(sha: string): Promise<ObjectType | null>;
324
- }
325
- /**
326
- * GPG signing interface.
327
- *
328
- * @description
329
- * Interface for GPG signing and verification operations.
330
- * Used for signed tag creation and verification.
331
- */
332
- export interface GPGSigner {
333
- /**
334
- * Sign data and return the signature.
335
- *
336
- * @param data - Binary data to sign
337
- * @param keyId - Optional specific key ID to use
338
- * @returns ASCII-armored GPG signature
339
- * @throws Error if signing fails
340
- */
341
- sign(data: Uint8Array, keyId?: string): Promise<string>;
342
- /**
343
- * Verify a signature.
344
- *
345
- * @param data - Binary data that was signed
346
- * @param signature - ASCII-armored GPG signature to verify
347
- * @returns Verification result with validity and signer info
348
- */
349
- verify(data: Uint8Array, signature: string): Promise<TagSignatureVerification>;
350
- }
351
- /**
352
- * Tag manager for handling Git tag operations.
353
- *
354
- * @description
355
- * Provides a comprehensive API for tag management including both
356
- * lightweight and annotated tags. Uses RefStorage for refs and
357
- * TagObjectStorage for tag objects.
358
- *
359
- * Note: Most methods are currently stubs (TODO) and will throw 'Not implemented'.
360
- * These will be implemented in the GREEN phase of TDD development.
361
- *
362
- * @example
363
- * ```typescript
364
- * const manager = new TagManager(refStorage, objectStorage, gpgSigner)
365
- *
366
- * // Create a release tag
367
- * const tag = await manager.createTag('v1.0.0', commitSha, {
368
- * annotated: true,
369
- * message: 'Version 1.0.0 release',
370
- * tagger: { name: 'Alice', email: 'alice@example.com', timestamp: 1704067200, timezone: '+0000' }
371
- * })
372
- *
373
- * // List version tags
374
- * const versions = await manager.listTags({ pattern: 'v*' })
375
- *
376
- * // Verify signed tag
377
- * const verification = await manager.verifyTag('v1.0.0')
378
- * ```
379
- */
380
- export declare class TagManager {
381
- private refStorage;
382
- private objectStorage;
383
- private gpgSigner?;
384
- private pendingCreations;
385
- /**
386
- * Create a new TagManager.
387
- *
388
- * @param refStorage - RefStorage instance for managing tag refs
389
- * @param objectStorage - Storage for reading/writing tag objects
390
- * @param gpgSigner - Optional GPG signer for signed tags
391
- */
392
- constructor(refStorage: TagRefStorage, objectStorage: TagObjectStorage, gpgSigner?: GPGSigner);
393
- /**
394
- * Create a new tag.
395
- *
396
- * @description
397
- * Creates either a lightweight or annotated tag pointing to the
398
- * specified target. For annotated tags, creates a tag object with
399
- * metadata and optionally signs it.
400
- *
401
- * @param name - Tag name (without refs/tags/ prefix)
402
- * @param target - Target SHA to tag (usually a commit)
403
- * @param options - Creation options
404
- * @returns The created tag
405
- * @throws TagError with code 'INVALID_TAG_NAME' if name is invalid
406
- * @throws TagError with code 'TAG_EXISTS' if tag exists and not forcing
407
- * @throws TagError with code 'MESSAGE_REQUIRED' for annotated tag without message
408
- * @throws TagError with code 'GPG_ERROR' if signing fails
409
- *
410
- * @example
411
- * ```typescript
412
- * // Create lightweight tag
413
- * const light = await manager.createTag('v0.1.0', commitSha)
414
- *
415
- * // Create annotated tag
416
- * const annotated = await manager.createTag('v1.0.0', commitSha, {
417
- * annotated: true,
418
- * message: 'Release 1.0.0',
419
- * tagger: { name: 'Alice', email: 'alice@example.com', timestamp: 1704067200, timezone: '+0000' }
420
- * })
421
- *
422
- * // Create signed tag
423
- * const signed = await manager.createTag('v1.0.0', commitSha, {
424
- * annotated: true,
425
- * message: 'Release 1.0.0',
426
- * sign: true
427
- * })
428
- * ```
429
- */
430
- createTag(name: string, target: string, options?: CreateTagOptions): Promise<Tag>;
431
- /**
432
- * Delete a tag.
433
- *
434
- * @description
435
- * Removes a tag ref. Does not delete the tag object (if annotated)
436
- * as it may be referenced elsewhere (reflog, etc.).
437
- *
438
- * @param name - Tag name to delete
439
- * @param options - Deletion options
440
- * @returns True if tag was deleted, false if it didn't exist (with force)
441
- * @throws TagError with code 'TAG_NOT_FOUND' if tag doesn't exist (without force)
442
- *
443
- * @example
444
- * ```typescript
445
- * await manager.deleteTag('v0.9.0-beta')
446
- *
447
- * // Delete even if doesn't exist
448
- * await manager.deleteTag('maybe-exists', { force: true })
449
- * ```
450
- */
451
- deleteTag(name: string, options?: DeleteTagOptions): Promise<boolean>;
452
- /**
453
- * List all tags.
454
- *
455
- * @description
456
- * Returns tags matching the specified criteria.
457
- * By default returns all tags sorted by name.
458
- *
459
- * @param options - Listing options
460
- * @returns Array of tags matching criteria
461
- *
462
- * @example
463
- * ```typescript
464
- * // List all tags
465
- * const all = await manager.listTags()
466
- *
467
- * // List version tags with metadata
468
- * const versions = await manager.listTags({
469
- * pattern: 'v*',
470
- * sort: 'version',
471
- * includeMetadata: true
472
- * })
473
- *
474
- * // Get latest 5 tags
475
- * const latest = await manager.listTags({
476
- * sort: 'date',
477
- * sortDirection: 'desc',
478
- * limit: 5,
479
- * includeMetadata: true
480
- * })
481
- * ```
482
- */
483
- listTags(options?: ListTagsOptions): Promise<Tag[]>;
484
- /**
485
- * Get a tag by name.
486
- *
487
- * @description
488
- * Retrieves tag information. Use resolve=true to get full
489
- * annotated tag metadata.
490
- *
491
- * @param name - Tag name
492
- * @param options - Get options
493
- * @returns Tag info or null if not found
494
- *
495
- * @example
496
- * ```typescript
497
- * // Quick lookup
498
- * const tag = await manager.getTag('v1.0.0')
499
- *
500
- * // Get full metadata
501
- * const full = await manager.getTag('v1.0.0', { resolve: true })
502
- * if (full?.type === 'annotated') {
503
- * console.log(`Tagged by: ${full.tagger?.name}`)
504
- * console.log(`Message: ${full.message}`)
505
- * }
506
- * ```
507
- */
508
- getTag(name: string, options?: GetTagOptions): Promise<Tag | null>;
509
- /**
510
- * Check if a tag exists.
511
- *
512
- * @description
513
- * Quick check for tag existence without fetching full info.
514
- *
515
- * @param name - Tag name
516
- * @returns True if tag exists
517
- *
518
- * @example
519
- * ```typescript
520
- * if (await manager.tagExists('v1.0.0')) {
521
- * console.log('Tag already exists')
522
- * }
523
- * ```
524
- */
525
- tagExists(name: string): Promise<boolean>;
526
- /**
527
- * Get the target (commit SHA) that a tag points to.
528
- *
529
- * @description
530
- * Resolves through annotated tags to get the final target.
531
- * For lightweight tags, returns the sha directly.
532
- * For annotated tags, returns the targetSha.
533
- *
534
- * @param name - Tag name
535
- * @returns Target commit SHA
536
- * @throws TagError with code 'TAG_NOT_FOUND' if tag doesn't exist
537
- *
538
- * @example
539
- * ```typescript
540
- * const commitSha = await manager.getTagTarget('v1.0.0')
541
- * ```
542
- */
543
- getTagTarget(name: string): Promise<string>;
544
- /**
545
- * Verify a tag's GPG signature.
546
- *
547
- * @description
548
- * Verifies the GPG signature on a signed annotated tag.
549
- * Returns verification result with signer info.
550
- *
551
- * @param name - Tag name to verify
552
- * @returns Verification result
553
- * @throws TagError with code 'TAG_NOT_FOUND' if tag doesn't exist
554
- *
555
- * @example
556
- * ```typescript
557
- * const result = await manager.verifyTag('v1.0.0')
558
- * if (result.valid) {
559
- * console.log(`Signed by: ${result.signer}`)
560
- * console.log(`Trust: ${result.trustLevel}`)
561
- * } else {
562
- * console.log(`Verification failed: ${result.error}`)
563
- * }
564
- * ```
565
- */
566
- verifyTag(name: string): Promise<TagSignatureVerification>;
567
- /**
568
- * Check if a tag is annotated.
569
- *
570
- * @description
571
- * Determines if a tag is annotated (has a tag object) or lightweight.
572
- *
573
- * @param name - Tag name
574
- * @returns True if the tag is annotated
575
- * @throws TagError with code 'TAG_NOT_FOUND' if tag doesn't exist
576
- *
577
- * @example
578
- * ```typescript
579
- * if (await manager.isAnnotatedTag('v1.0.0')) {
580
- * console.log('This is an annotated tag')
581
- * }
582
- * ```
583
- */
584
- isAnnotatedTag(name: string): Promise<boolean>;
585
- }
586
- /**
587
- * Validate a tag name according to Git rules.
588
- *
589
- * @description
590
- * Tags follow the same rules as refs but under refs/tags/.
591
- * This validates against the full git-check-ref-format rules.
592
- *
593
- * **Rules**:
594
- * - Cannot be empty
595
- * - Cannot end with '/' or '.lock'
596
- * - Cannot contain '..', '@{', control chars, space, ~, ^, :, ?, *, [, \
597
- * - Components cannot start or end with '.'
598
- *
599
- * Note: This is a stub implementation. Full validation will be added in GREEN phase.
600
- *
601
- * @param name - Tag name to validate
602
- * @returns True if valid
603
- *
604
- * @see https://git-scm.com/docs/git-check-ref-format
605
- *
606
- * @example
607
- * ```typescript
608
- * isValidTagName('v1.0.0') // true
609
- * isValidTagName('release/1.0') // true
610
- * isValidTagName('v1.0.0.lock') // false (ends with .lock)
611
- * isValidTagName('v1..0') // false (contains ..)
612
- * isValidTagName('') // false (empty)
613
- * ```
614
- */
615
- export declare function isValidTagName(name: string): boolean;
616
- /**
617
- * Type guard for annotated tags.
618
- *
619
- * @description
620
- * Checks if a tag is annotated with full metadata.
621
- * Narrows the type to include tagger and message.
622
- *
623
- * @param tag - Tag to check
624
- * @returns True if the tag is annotated with full metadata
625
- *
626
- * @example
627
- * ```typescript
628
- * if (isAnnotatedTag(tag)) {
629
- * // tag.tagger and tag.message are now guaranteed
630
- * console.log(`Tagged by: ${tag.tagger.name}`)
631
- * }
632
- * ```
633
- */
634
- export declare function isAnnotatedTag(tag: Tag): tag is Tag & {
635
- type: 'annotated';
636
- tagger: Author;
637
- message: string;
638
- };
639
- /**
640
- * Format a tag message.
641
- *
642
- * @description
643
- * Normalizes a tag message: handles line endings, trims whitespace,
644
- * ensures proper formatting.
645
- *
646
- * @param message - Raw message input
647
- * @returns Formatted message
648
- *
649
- * @example
650
- * ```typescript
651
- * formatTagMessage(' Hello World \r\n') // 'Hello World\n'
652
- * ```
653
- */
654
- export declare function formatTagMessage(message: string): string;
655
- /**
656
- * Parse a tag message from raw content.
657
- *
658
- * @description
659
- * Separates the message from any GPG signature.
660
- * GPG signatures start with '-----BEGIN PGP SIGNATURE-----'.
661
- *
662
- * @param content - Raw tag content
663
- * @returns Parsed message and optional signature
664
- *
665
- * @example
666
- * ```typescript
667
- * const { message, signature } = parseTagMessage(content)
668
- * if (signature) {
669
- * console.log('Tag is signed')
670
- * }
671
- * ```
672
- */
673
- export declare function parseTagMessage(content: string): {
674
- message: string;
675
- signature?: string;
676
- };
677
- /**
678
- * Create a tag (lightweight or annotated).
679
- *
680
- * @description
681
- * Convenience function that wraps TagManager.createTag.
682
- *
683
- * @param manager - TagManager instance
684
- * @param name - Tag name
685
- * @param target - Target SHA to tag
686
- * @param options - Creation options
687
- * @returns Created tag
688
- *
689
- * @example
690
- * ```typescript
691
- * const tag = await createTag(manager, 'v1.0.0', commitSha, {
692
- * annotated: true,
693
- * message: 'Release 1.0.0'
694
- * })
695
- * ```
696
- */
697
- export declare function createTag(manager: TagManager, name: string, target: string, options?: CreateTagOptions): Promise<Tag>;
698
- /**
699
- * Create an annotated tag with message.
700
- *
701
- * @description
702
- * Convenience function for creating annotated tags.
703
- * Automatically sets annotated=true.
704
- *
705
- * @param manager - TagManager instance
706
- * @param name - Tag name
707
- * @param target - Target SHA to tag
708
- * @param message - Tag message
709
- * @param tagger - Tagger information
710
- * @param options - Additional options (excluding annotated, message, tagger)
711
- * @returns Created annotated tag
712
- *
713
- * @example
714
- * ```typescript
715
- * const tag = await createAnnotatedTag(
716
- * manager,
717
- * 'v1.0.0',
718
- * commitSha,
719
- * 'Release 1.0.0',
720
- * { name: 'Alice', email: 'alice@example.com', timestamp: Date.now()/1000, timezone: '+0000' }
721
- * )
722
- * ```
723
- */
724
- export declare function createAnnotatedTag(manager: TagManager, name: string, target: string, message: string, tagger: Author, options?: Omit<CreateTagOptions, 'annotated' | 'message' | 'tagger'>): Promise<Tag>;
725
- /**
726
- * Delete a tag.
727
- *
728
- * @description
729
- * Convenience function that wraps TagManager.deleteTag.
730
- *
731
- * @param manager - TagManager instance
732
- * @param name - Tag name to delete
733
- * @param options - Deletion options
734
- * @returns True if deleted
735
- *
736
- * @example
737
- * ```typescript
738
- * await deleteTag(manager, 'v0.9.0-beta')
739
- * ```
740
- */
741
- export declare function deleteTag(manager: TagManager, name: string, options?: DeleteTagOptions): Promise<boolean>;
742
- /**
743
- * List all tags.
744
- *
745
- * @description
746
- * Convenience function that wraps TagManager.listTags.
747
- *
748
- * @param manager - TagManager instance
749
- * @param options - Listing options
750
- * @returns Array of tags
751
- *
752
- * @example
753
- * ```typescript
754
- * const tags = await listTags(manager, { pattern: 'v1.*' })
755
- * ```
756
- */
757
- export declare function listTags(manager: TagManager, options?: ListTagsOptions): Promise<Tag[]>;
758
- /**
759
- * Get a tag by name.
760
- *
761
- * @description
762
- * Convenience function that wraps TagManager.getTag.
763
- *
764
- * @param manager - TagManager instance
765
- * @param name - Tag name
766
- * @param options - Get options
767
- * @returns Tag info or null
768
- *
769
- * @example
770
- * ```typescript
771
- * const tag = await getTag(manager, 'v1.0.0', { resolve: true })
772
- * ```
773
- */
774
- export declare function getTag(manager: TagManager, name: string, options?: GetTagOptions): Promise<Tag | null>;
775
- /**
776
- * Check if a tag is annotated.
777
- *
778
- * @description
779
- * Convenience function that wraps TagManager.isAnnotatedTag.
780
- *
781
- * @param manager - TagManager instance
782
- * @param name - Tag name
783
- * @returns True if annotated
784
- *
785
- * @example
786
- * ```typescript
787
- * if (await checkIsAnnotatedTag(manager, 'v1.0.0')) {
788
- * console.log('Annotated tag')
789
- * }
790
- * ```
791
- */
792
- export declare function checkIsAnnotatedTag(manager: TagManager, name: string): Promise<boolean>;
793
- /**
794
- * Verify a tag's signature.
795
- *
796
- * @description
797
- * Convenience function that wraps TagManager.verifyTag.
798
- *
799
- * @param manager - TagManager instance
800
- * @param name - Tag name
801
- * @returns Verification result
802
- *
803
- * @example
804
- * ```typescript
805
- * const result = await verifyTagSignature(manager, 'v1.0.0')
806
- * ```
807
- */
808
- export declare function verifyTagSignature(manager: TagManager, name: string): Promise<TagSignatureVerification>;
809
- /**
810
- * Get the target commit SHA for a tag.
811
- *
812
- * @description
813
- * Convenience function that wraps TagManager.getTagTarget.
814
- *
815
- * @param manager - TagManager instance
816
- * @param name - Tag name
817
- * @returns Target commit SHA
818
- *
819
- * @example
820
- * ```typescript
821
- * const sha = await getTagTarget(manager, 'v1.0.0')
822
- * ```
823
- */
824
- export declare function getTagTarget(manager: TagManager, name: string): Promise<string>;
825
- /**
826
- * Sort tags by semantic version.
827
- *
828
- * @description
829
- * Sorts tags that look like semantic versions (v1.2.3).
830
- * Non-semver tags are sorted lexicographically at the end.
831
- *
832
- * @param tags - Array of tags to sort
833
- * @param direction - Sort direction ('asc' or 'desc')
834
- * @returns Sorted array of tags
835
- *
836
- * @example
837
- * ```typescript
838
- * const sorted = sortTagsByVersion(tags, 'desc')
839
- * // ['v2.0.0', 'v1.10.0', 'v1.9.0', 'v1.0.0', ...]
840
- * ```
841
- */
842
- export declare function sortTagsByVersion(tags: Tag[], direction?: 'asc' | 'desc'): Tag[];
843
- /**
844
- * Filter tags by glob pattern.
845
- *
846
- * @description
847
- * Filters tags matching a glob pattern.
848
- * Supports * (any chars) and ? (single char) wildcards.
849
- *
850
- * @param tags - Array of tags to filter
851
- * @param pattern - Glob pattern (e.g., 'v1.*', 'release-*')
852
- * @returns Filtered array of tags
853
- *
854
- * @example
855
- * ```typescript
856
- * const v1Tags = filterTagsByPattern(tags, 'v1.*')
857
- * ```
858
- */
859
- export declare function filterTagsByPattern(tags: Tag[], pattern: string): Tag[];
860
- //# sourceMappingURL=tag.d.ts.map