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
package/dist/cli/index.js DELETED
@@ -1,579 +0,0 @@
1
- /**
2
- * @fileoverview CLI Entry Point for gitx
3
- *
4
- * This module provides the main command-line interface for gitx, a git-compatible
5
- * version control system. It handles argument parsing, command routing, and
6
- * provides the foundation for all CLI subcommands.
7
- *
8
- * @module cli/index
9
- *
10
- * @example
11
- * // Create and run CLI programmatically
12
- * import { createCLI, runCLI } from './cli'
13
- *
14
- * const cli = createCLI({ name: 'gitx', version: '1.0.0' })
15
- * cli.registerCommand('status', statusHandler)
16
- * await cli.run(['status', '--short'])
17
- *
18
- * @example
19
- * // Parse arguments without running
20
- * import { parseArgs } from './cli'
21
- *
22
- * const parsed = parseArgs(['status', '--short', '--branch'])
23
- * console.log(parsed.command) // 'status'
24
- * console.log(parsed.options) // { short: true, branch: true }
25
- */
26
- import cac from 'cac';
27
- import { existsSync } from 'fs';
28
- import { resolve } from 'path';
29
- import { checkoutCommand } from './commands/checkout';
30
- // ============================================================================
31
- // Constants
32
- // ============================================================================
33
- /** Available subcommands for the CLI */
34
- const SUBCOMMANDS = ['status', 'diff', 'log', 'blame', 'commit', 'branch', 'checkout', 'review', 'web'];
35
- /** Current CLI version */
36
- const VERSION = '0.0.1';
37
- /** CLI name */
38
- const NAME = 'gitx';
39
- // ============================================================================
40
- // CLI Class
41
- // ============================================================================
42
- /**
43
- * Main CLI class for gitx command-line interface.
44
- *
45
- * @description Provides command registration, argument parsing, help generation,
46
- * and command execution. Supports custom output streams for testing.
47
- *
48
- * @example
49
- * const cli = new CLI({ name: 'gitx', version: '1.0.0' })
50
- * cli.registerCommand('status', statusHandler)
51
- * const result = await cli.run(['status', '--short'])
52
- *
53
- * @example
54
- * // With custom output streams for testing
55
- * const output: string[] = []
56
- * const cli = new CLI({
57
- * stdout: (msg) => output.push(msg),
58
- * stderr: (msg) => output.push(`ERROR: ${msg}`)
59
- * })
60
- */
61
- export class CLI {
62
- /** The name of the CLI tool */
63
- name;
64
- /** The version of the CLI tool */
65
- version;
66
- /** Registered command handlers */
67
- handlers = new Map();
68
- /** Function for standard output */
69
- stdout;
70
- /** Function for error output */
71
- stderr;
72
- /**
73
- * Creates a new CLI instance.
74
- *
75
- * @description Initializes the CLI with optional name, version, and I/O functions.
76
- * Defaults are provided for all options.
77
- *
78
- * @param options - Configuration options
79
- * @param options.name - CLI name (default: 'gitx')
80
- * @param options.version - CLI version (default: '0.0.1')
81
- * @param options.stdout - Standard output function (default: console.log)
82
- * @param options.stderr - Error output function (default: console.error)
83
- *
84
- * @example
85
- * const cli = new CLI({ name: 'my-tool', version: '2.0.0' })
86
- */
87
- constructor(options = {}) {
88
- this.name = options.name ?? NAME;
89
- this.version = options.version ?? VERSION;
90
- this.stdout = options.stdout ?? console.log;
91
- this.stderr = options.stderr ?? console.error;
92
- }
93
- /**
94
- * Registers a command handler for a subcommand.
95
- *
96
- * @description Associates a handler function with a command name. The handler
97
- * will be invoked when that command is executed.
98
- *
99
- * @param name - The command name (e.g., 'status', 'diff')
100
- * @param handler - The function to handle the command
101
- *
102
- * @example
103
- * cli.registerCommand('status', async (ctx) => {
104
- * const status = await getStatus(ctx.cwd)
105
- * ctx.stdout(formatStatus(status))
106
- * })
107
- */
108
- registerCommand(name, handler) {
109
- this.handlers.set(name, handler);
110
- }
111
- /**
112
- * Runs the CLI with the provided arguments.
113
- *
114
- * @description Parses arguments, handles help/version flags, validates commands,
115
- * and executes the appropriate handler. Returns a result object with exit code.
116
- *
117
- * @param args - Command-line arguments (excluding 'node' and script name)
118
- * @param options - Run options
119
- * @param options.skipCwdCheck - Skip validation of --cwd directory existence
120
- * @returns Promise<CLIResult> with exitCode, command, and potential error
121
- *
122
- * @throws Never throws directly - errors are captured in CLIResult.error
123
- *
124
- * @example
125
- * const result = await cli.run(['status', '--short'])
126
- * if (result.exitCode === 0) {
127
- * console.log('Success!')
128
- * } else {
129
- * console.error('Failed:', result.error?.message)
130
- * }
131
- *
132
- * @example
133
- * // Skip cwd validation for testing
134
- * const result = await cli.run(['status'], { skipCwdCheck: true })
135
- */
136
- async run(args, options = {}) {
137
- const parsed = parseArgs(args);
138
- // Check for help flag
139
- if (parsed.options.help || parsed.options.h) {
140
- // If there's a registered handler, let it handle its own help
141
- if (parsed.command && this.handlers.has(parsed.command)) {
142
- // Pass through to handler - it will handle --help itself
143
- }
144
- else if (parsed.command) {
145
- this.stdout(this.getSubcommandHelp(parsed.command));
146
- return { exitCode: 0, command: parsed.command };
147
- }
148
- else {
149
- this.stdout(this.getHelp());
150
- return { exitCode: 0, command: parsed.command };
151
- }
152
- }
153
- // Check for version flag (only when no command is specified)
154
- // When a command is present, -v should be interpreted as verbose for that command
155
- if (!parsed.command && (parsed.options.version || parsed.options.v)) {
156
- this.stdout(`${this.name} ${this.version}`);
157
- return { exitCode: 0 };
158
- }
159
- // For --version flag without command
160
- if (!parsed.command && parsed.options.version) {
161
- this.stdout(`${this.name} ${this.version}`);
162
- return { exitCode: 0 };
163
- }
164
- // Check for unknown flags (flags starting with -- that aren't recognized)
165
- // Skip flag validation for registered commands - they handle their own flags
166
- if (parsed.command && this.handlers.has(parsed.command)) {
167
- // Skip flag validation for registered commands
168
- }
169
- else {
170
- const knownFlags = ['cwd', 'C', 'help', 'h', 'version', 'v', 'short', 'branch', 'staged',
171
- 'cached', 'n', 'oneline', 'graph', 'all', 'format', 'L', 'm', 'amend', 'a', 'd', 'D', 'list',
172
- 'interactive', 'port', 'open', 'verbose', 'vv', 'u', 'includeUntracked', 'keepIndex', 'index',
173
- 'message', 'quiet', 'q', 'pathspec', 'force', 'f', 'b', 'B', 'track', 't', 'merge', 'detach',
174
- 'orphan', 'theirs', 'ours', 'conflict', 'patch', 'p', 'ff', 'ffOnly', 'squash', 'abort',
175
- 'continue', 'strategy', 'strategyOption', 'update', 'dryRun', 'intentToAdd', 'refresh', 'A', 'N'];
176
- for (const key of Object.keys(parsed.options)) {
177
- if (!knownFlags.includes(key) && key !== '--') {
178
- this.stderr(`Unknown option: --${key}\nRun 'gitx --help' for available commands.`);
179
- return { exitCode: 1, error: new Error(`Unknown option: --${key}`) };
180
- }
181
- }
182
- }
183
- // If no command, show help
184
- if (!parsed.command) {
185
- this.stdout(this.getHelp());
186
- return { exitCode: 0 };
187
- }
188
- // Check if command exists
189
- if (!SUBCOMMANDS.includes(parsed.command) && !this.handlers.has(parsed.command)) {
190
- const suggestion = this.suggestCommand(parsed.command);
191
- let errorMsg = `Unknown command: ${parsed.command}`;
192
- if (suggestion) {
193
- errorMsg += `\nDid you mean '${suggestion}'?`;
194
- }
195
- errorMsg += `\nRun 'gitx --help' for available commands.`;
196
- this.stderr(errorMsg);
197
- return { exitCode: 1, command: parsed.command, error: new Error(`Unknown command: ${parsed.command}`) };
198
- }
199
- // Execute command handler if registered
200
- const handler = this.handlers.get(parsed.command);
201
- if (handler) {
202
- try {
203
- await handler({
204
- cwd: parsed.cwd,
205
- args: parsed.args,
206
- options: parsed.options,
207
- rawArgs: parsed.rawArgs,
208
- stdout: this.stdout,
209
- stderr: this.stderr
210
- });
211
- return { exitCode: 0, command: parsed.command };
212
- }
213
- catch (err) {
214
- const error = err instanceof Error ? err : new Error(String(err));
215
- this.stderr(`Error: ${error.message}`);
216
- return { exitCode: 1, command: parsed.command, error };
217
- }
218
- }
219
- // Check if --cwd directory exists (only for built-in commands without handlers)
220
- if (parsed.cwd !== process.cwd() && !options.skipCwdCheck) {
221
- if (!existsSync(parsed.cwd)) {
222
- this.stderr(`Error: directory does not exist: ${parsed.cwd}`);
223
- return { exitCode: 1, command: parsed.command, error: new Error(`directory does not exist: ${parsed.cwd}`) };
224
- }
225
- }
226
- // Default behavior for built-in commands without handler
227
- return { exitCode: 0, command: parsed.command };
228
- }
229
- /**
230
- * Generates the main help text for the CLI.
231
- *
232
- * @description Creates formatted help output showing available commands,
233
- * options, and usage information.
234
- *
235
- * @returns Formatted help string
236
- */
237
- getHelp() {
238
- return `${this.name} v${this.version}
239
-
240
- Usage: ${this.name} [options] <command> [args...]
241
-
242
- Commands:
243
- status Show the working tree status
244
- diff Show changes between commits
245
- log Show commit logs
246
- blame Show what revision and author last modified each line
247
- commit Record changes to the repository
248
- branch List, create, or delete branches
249
- checkout Switch branches or restore working tree files
250
- review Review pull requests
251
- web Start the web interface
252
-
253
- Options:
254
- -h, --help Show help
255
- -v, --version Show version
256
- -C, --cwd Set the working directory`;
257
- }
258
- /**
259
- * Generates help text for a specific subcommand.
260
- *
261
- * @description Creates formatted help output for a specific command
262
- * including its description and usage pattern.
263
- *
264
- * @param command - The command name to get help for
265
- * @returns Formatted help string for the command
266
- */
267
- getSubcommandHelp(command) {
268
- const descriptions = {
269
- status: 'Show the working tree status',
270
- diff: 'Show changes between commits',
271
- log: 'Show commit logs',
272
- blame: 'Show what revision and author last modified each line',
273
- commit: 'Record changes to the repository',
274
- branch: 'List, create, or delete branches',
275
- checkout: 'Switch branches or restore working tree files',
276
- review: 'Review pull requests',
277
- web: 'Start the web interface'
278
- };
279
- return `${this.name} ${command}
280
-
281
- ${descriptions[command] || 'Command help'}
282
-
283
- Usage: ${this.name} ${command} [options] [args...]`;
284
- }
285
- /**
286
- * Suggests a command based on a misspelled input.
287
- *
288
- * @description Uses Levenshtein distance to find the closest matching
289
- * command when the user enters an unknown command. Only suggests
290
- * commands within a distance of 3 edits.
291
- *
292
- * @param input - The misspelled command input
293
- * @returns The suggested command name, or null if no close match
294
- */
295
- suggestCommand(input) {
296
- // Simple Levenshtein distance for typo detection
297
- let minDistance = Infinity;
298
- let suggestion = null;
299
- for (const cmd of SUBCOMMANDS) {
300
- const distance = levenshteinDistance(input, cmd);
301
- if (distance < minDistance && distance <= 3) {
302
- minDistance = distance;
303
- suggestion = cmd;
304
- }
305
- }
306
- return suggestion;
307
- }
308
- }
309
- // ============================================================================
310
- // Utility Functions
311
- // ============================================================================
312
- /**
313
- * Calculates the Levenshtein distance between two strings.
314
- *
315
- * @description Computes the minimum number of single-character edits
316
- * (insertions, deletions, or substitutions) required to change one
317
- * string into the other. Used for command suggestion/typo detection.
318
- *
319
- * @param a - First string
320
- * @param b - Second string
321
- * @returns The edit distance between the strings
322
- *
323
- * @example
324
- * levenshteinDistance('status', 'staus') // Returns 1
325
- * levenshteinDistance('commit', 'comit') // Returns 1
326
- * levenshteinDistance('diff', 'branch') // Returns 6
327
- */
328
- function levenshteinDistance(a, b) {
329
- const matrix = [];
330
- for (let i = 0; i <= b.length; i++) {
331
- matrix[i] = [i];
332
- }
333
- for (let j = 0; j <= a.length; j++) {
334
- matrix[0][j] = j;
335
- }
336
- for (let i = 1; i <= b.length; i++) {
337
- for (let j = 1; j <= a.length; j++) {
338
- if (b.charAt(i - 1) === a.charAt(j - 1)) {
339
- matrix[i][j] = matrix[i - 1][j - 1];
340
- }
341
- else {
342
- matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, matrix[i][j - 1] + 1, matrix[i - 1][j] + 1);
343
- }
344
- }
345
- }
346
- return matrix[b.length][a.length];
347
- }
348
- // ============================================================================
349
- // Exported Functions
350
- // ============================================================================
351
- /**
352
- * Creates a new CLI instance with the provided options.
353
- *
354
- * @description Factory function for creating CLI instances. Provides a
355
- * convenient way to instantiate the CLI with custom configuration.
356
- *
357
- * @param options - Configuration options for the CLI
358
- * @param options.name - CLI name (default: 'gitx')
359
- * @param options.version - CLI version (default: '0.0.1')
360
- * @param options.stdout - Standard output function (default: console.log)
361
- * @param options.stderr - Error output function (default: console.error)
362
- * @returns A new CLI instance
363
- *
364
- * @example
365
- * const cli = createCLI({ name: 'my-git', version: '1.0.0' })
366
- * cli.registerCommand('status', statusHandler)
367
- * await cli.run(['status'])
368
- *
369
- * @example
370
- * // For testing with captured output
371
- * const output: string[] = []
372
- * const cli = createCLI({
373
- * stdout: (msg) => output.push(msg)
374
- * })
375
- */
376
- export function createCLI(options = {}) {
377
- return new CLI(options);
378
- }
379
- /**
380
- * Parses command-line arguments into a structured format.
381
- *
382
- * @description Uses the cac library to parse arguments, extracting the command,
383
- * positional arguments, options/flags, and handling special cases like --cwd
384
- * and the '--' separator for raw arguments.
385
- *
386
- * @param args - Array of command-line arguments (excluding 'node' and script name)
387
- * @returns ParsedArgs object with command, args, options, rawArgs, and cwd
388
- *
389
- * @example
390
- * const parsed = parseArgs(['status', '--short', '--branch'])
391
- * // Returns: {
392
- * // command: 'status',
393
- * // args: [],
394
- * // options: { short: true, branch: true },
395
- * // rawArgs: [],
396
- * // cwd: process.cwd()
397
- * // }
398
- *
399
- * @example
400
- * const parsed = parseArgs(['--cwd', '/repo', 'diff', '--staged'])
401
- * // Returns: {
402
- * // command: 'diff',
403
- * // args: [],
404
- * // options: { staged: true, cwd: '/repo' },
405
- * // rawArgs: [],
406
- * // cwd: '/repo'
407
- * // }
408
- *
409
- * @example
410
- * // With raw args after '--'
411
- * const parsed = parseArgs(['commit', '-m', 'msg', '--', 'file.txt'])
412
- * // Returns: {
413
- * // command: 'commit',
414
- * // args: [],
415
- * // options: { m: 'msg' },
416
- * // rawArgs: ['file.txt'],
417
- * // cwd: process.cwd()
418
- * // }
419
- */
420
- export function parseArgs(args) {
421
- const cli = cac('gitx');
422
- // Global options
423
- cli.option('-C, --cwd <path>', 'Set the working directory');
424
- cli.option('-h, --help', 'Show help');
425
- cli.option('-v, --version', 'Show version');
426
- // Status command options
427
- cli.option('--short', 'Give the output in short format');
428
- cli.option('--branch', 'Show the branch info');
429
- // Diff command options
430
- cli.option('--staged', 'Show staged changes');
431
- cli.option('--cached', 'Show cached changes (alias for staged)');
432
- // Log command options
433
- cli.option('-n <count>', 'Limit the number of commits');
434
- cli.option('--oneline', 'Show each commit on a single line');
435
- cli.option('--graph', 'Draw a text-based graph');
436
- cli.option('--all', 'Show all refs');
437
- cli.option('--format <format>', 'Pretty-print format');
438
- // Blame command options
439
- cli.option('-L <range>', 'Line range');
440
- // Commit command options
441
- cli.option('-m <message>', 'Commit message');
442
- cli.option('--amend', 'Amend the previous commit');
443
- cli.option('-a', 'Stage all modified files');
444
- // Branch command options
445
- cli.option('-d', 'Delete a branch');
446
- cli.option('-D', 'Force delete a branch');
447
- cli.option('--list', 'List branches');
448
- cli.option('-v, --verbose', 'Verbose output');
449
- cli.option('-vv', 'Very verbose output');
450
- // Review command options
451
- cli.option('--interactive', 'Interactive review mode');
452
- // Web command options
453
- cli.option('--port <port>', 'Port number');
454
- cli.option('--open', 'Open in browser');
455
- // Stash command options
456
- cli.option('-u, --include-untracked', 'Include untracked files');
457
- cli.option('--keep-index', 'Keep staged changes in the index');
458
- cli.option('--index', 'Restore the index state');
459
- cli.option('-q, --quiet', 'Quiet mode');
460
- // Checkout command options
461
- cli.option('-b <branch>', 'Create and checkout a new branch');
462
- cli.option('-B <branch>', 'Create/reset and checkout a branch');
463
- cli.option('-f, --force', 'Force checkout');
464
- cli.option('--detach', 'Detach HEAD at commit');
465
- cli.option('--orphan <branch>', 'Create orphan branch');
466
- cli.option('-t, --track', 'Set up tracking mode');
467
- cli.option('--merge', 'Merge with current branch');
468
- cli.option('--theirs', 'Checkout theirs version for conflicts');
469
- cli.option('--ours', 'Checkout ours version for conflicts');
470
- cli.option('--conflict <style>', 'Conflict style');
471
- cli.option('-p, --patch', 'Select hunks interactively');
472
- // Merge command options
473
- cli.option('--no-ff', 'Create a merge commit even when fast-forward is possible');
474
- cli.option('--ff-only', 'Refuse to merge unless fast-forward is possible');
475
- cli.option('--squash', 'Squash commits without creating merge commit');
476
- cli.option('--abort', 'Abort the current in-progress merge');
477
- cli.option('--continue', 'Continue the merge after resolving conflicts');
478
- cli.option('--strategy <strategy>', 'Use the given merge strategy');
479
- cli.option('--strategy-option <option>', 'Pass option to merge strategy');
480
- // Add command options
481
- cli.option('-A, --all', 'Add all files (new, modified, deleted)');
482
- cli.option('--update', 'Update tracked files only');
483
- cli.option('--dry-run', 'Show what would be added');
484
- cli.option('-N, --intent-to-add', 'Record that the path will be added later');
485
- cli.option('--refresh', "Don't add, just refresh stat info");
486
- // Parse arguments
487
- const parsed = cli.parse(['node', 'gitx', ...args], { run: false });
488
- // Extract command and args
489
- const positionalArgs = parsed.args.slice(); // Clone to avoid mutation
490
- let command;
491
- const commandArgs = [];
492
- let rawArgs = [];
493
- // Find command from positional args
494
- for (let i = 0; i < positionalArgs.length; i++) {
495
- const arg = positionalArgs[i];
496
- if (!command && SUBCOMMANDS.includes(arg)) {
497
- command = arg;
498
- }
499
- else if (arg === '--') {
500
- rawArgs = positionalArgs.slice(i + 1);
501
- break;
502
- }
503
- else if (command) {
504
- commandArgs.push(arg);
505
- }
506
- else if (!arg.startsWith('-')) {
507
- // This is either a command we don't recognize or a positional arg before command
508
- command = arg;
509
- }
510
- }
511
- // Handle --cwd option
512
- let cwd = process.cwd();
513
- if (parsed.options.cwd) {
514
- cwd = resolve(process.cwd(), parsed.options.cwd);
515
- }
516
- else if (parsed.options.C) {
517
- cwd = resolve(process.cwd(), parsed.options.C);
518
- }
519
- // Get rawArgs from cac's '--' key
520
- if (parsed.options['--'] && Array.isArray(parsed.options['--'])) {
521
- rawArgs = parsed.options['--'];
522
- }
523
- // Clean up options object
524
- const options = { ...parsed.options };
525
- delete options['--'];
526
- // Convert numeric options (only if they look like numbers)
527
- if (options.n !== undefined && typeof options.n === 'string') {
528
- const parsed = parseInt(options.n, 10);
529
- // Only convert if it's a valid number (for log command)
530
- // For add command, -n file.txt should keep 'file.txt' as string
531
- if (!isNaN(parsed)) {
532
- options.n = parsed;
533
- }
534
- // Otherwise keep as string for add command to handle
535
- }
536
- if (options.port !== undefined && typeof options.port === 'string') {
537
- options.port = parseInt(options.port, 10);
538
- }
539
- return {
540
- command,
541
- args: commandArgs,
542
- options,
543
- rawArgs,
544
- cwd
545
- };
546
- }
547
- /**
548
- * Convenience function to create a CLI and run it with the provided arguments.
549
- *
550
- * @description Creates a new CLI instance with the provided options and
551
- * immediately runs it with the given arguments. Useful for simple one-off
552
- * CLI executions.
553
- *
554
- * @param args - Command-line arguments to run
555
- * @param options - CLI options including output streams
556
- * @returns Promise<CLIResult> with exitCode, command, and potential error
557
- *
558
- * @example
559
- * const result = await runCLI(['status', '--short'])
560
- * console.log(result.exitCode) // 0 or 1
561
- *
562
- * @example
563
- * // With custom output handling
564
- * const output: string[] = []
565
- * const result = await runCLI(['status'], {
566
- * stdout: (msg) => output.push(msg),
567
- * stderr: (msg) => console.error(msg)
568
- * })
569
- */
570
- export async function runCLI(args, options = {}) {
571
- const cli = createCLI({
572
- stdout: options.stdout,
573
- stderr: options.stderr
574
- });
575
- // Register built-in command handlers
576
- cli.registerCommand('checkout', checkoutCommand);
577
- return cli.run(args);
578
- }
579
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAoJrD,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,wCAAwC;AACxC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAA;AAEhH,0BAA0B;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAA;AAEvB,eAAe;AACf,MAAM,IAAI,GAAG,MAAM,CAAA;AAEnB,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,GAAG;IACd,+BAA+B;IACxB,IAAI,CAAQ;IAEnB,kCAAkC;IAC3B,OA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C"}
@@ -1,12 +0,0 @@
1
- export interface DiffViewProps {
2
- diff: string;
3
- viewMode: 'split' | 'unified';
4
- }
5
- export interface DiffViewElement {
6
- type: 'DiffView';
7
- props: DiffViewProps;
8
- diff: string;
9
- viewMode: 'split' | 'unified';
10
- }
11
- export declare function DiffView(props: DiffViewProps): DiffViewElement;
12
- //# sourceMappingURL=DiffView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DiffView.d.ts","sourceRoot":"","sources":["../../../../src/cli/ui/components/DiffView.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,aAAa,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,eAAe,CAO9D"}
@@ -1,11 +0,0 @@
1
- // Diff View Component for gitx terminal UI
2
- // GREEN phase implementation
3
- export function DiffView(props) {
4
- return {
5
- type: 'DiffView',
6
- props,
7
- diff: props.diff,
8
- viewMode: props.viewMode
9
- };
10
- }
11
- //# sourceMappingURL=DiffView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DiffView.js","sourceRoot":"","sources":["../../../../src/cli/ui/components/DiffView.tsx"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,6BAA6B;AAc7B,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,KAAK;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAA;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- export interface ErrorDisplayProps {
2
- error: Error | string;
3
- }
4
- export interface ErrorDisplayElement {
5
- type: 'ErrorDisplay';
6
- props: ErrorDisplayProps;
7
- message: string;
8
- }
9
- export declare function ErrorDisplay(props: ErrorDisplayProps): ErrorDisplayElement;
10
- //# sourceMappingURL=ErrorDisplay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../../../src/cli/ui/components/ErrorDisplay.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,CAAA;IACpB,KAAK,EAAE,iBAAiB,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,CAO1E"}
@@ -1,11 +0,0 @@
1
- // Error Display Component for gitx terminal UI
2
- // GREEN phase implementation
3
- export function ErrorDisplay(props) {
4
- const message = props.error instanceof Error ? props.error.message : props.error;
5
- return {
6
- type: 'ErrorDisplay',
7
- props,
8
- message
9
- };
10
- }
11
- //# sourceMappingURL=ErrorDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../../../src/cli/ui/components/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,6BAA6B;AAY7B,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAA;IAChF,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,KAAK;QACL,OAAO;KACR,CAAA;AACH,CAAC"}