@chief-clancy/core 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +17 -14
  2. package/dist/board/azdo/azdo-board.d.ts.map +1 -1
  3. package/dist/board/azdo/azdo-board.js +1 -0
  4. package/dist/board/azdo/azdo-board.js.map +1 -1
  5. package/dist/board/github/api/api.d.ts.map +1 -1
  6. package/dist/board/github/api/api.js +5 -2
  7. package/dist/board/github/api/api.js.map +1 -1
  8. package/dist/board/github/github-board.d.ts.map +1 -1
  9. package/dist/board/github/github-board.js +2 -1
  10. package/dist/board/github/github-board.js.map +1 -1
  11. package/dist/board/github/relations/relations.js +2 -2
  12. package/dist/board/github/relations/relations.js.map +1 -1
  13. package/dist/board/jira/jira-board.d.ts.map +1 -1
  14. package/dist/board/jira/jira-board.js +1 -0
  15. package/dist/board/jira/jira-board.js.map +1 -1
  16. package/dist/board/linear/linear-board.d.ts.map +1 -1
  17. package/dist/board/linear/linear-board.js +1 -0
  18. package/dist/board/linear/linear-board.js.map +1 -1
  19. package/dist/board/notion/notion-board.d.ts.map +1 -1
  20. package/dist/board/notion/notion-board.js +2 -1
  21. package/dist/board/notion/notion-board.js.map +1 -1
  22. package/dist/board/shortcut/shortcut-board.d.ts.map +1 -1
  23. package/dist/board/shortcut/shortcut-board.js +1 -0
  24. package/dist/board/shortcut/shortcut-board.js.map +1 -1
  25. package/dist/index.d.ts +1 -31
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -23
  28. package/dist/index.js.map +1 -1
  29. package/dist/shared/remote/remote.js.map +1 -1
  30. package/dist/types/board.d.ts +2 -0
  31. package/dist/types/board.d.ts.map +1 -1
  32. package/package.json +6 -2
  33. package/dist/dev/lifecycle/branch/branch.d.ts +0 -35
  34. package/dist/dev/lifecycle/branch/branch.d.ts.map +0 -1
  35. package/dist/dev/lifecycle/branch/branch.js +0 -48
  36. package/dist/dev/lifecycle/branch/branch.js.map +0 -1
  37. package/dist/dev/lifecycle/branch/index.d.ts +0 -2
  38. package/dist/dev/lifecycle/branch/index.d.ts.map +0 -1
  39. package/dist/dev/lifecycle/branch/index.js +0 -2
  40. package/dist/dev/lifecycle/branch/index.js.map +0 -1
  41. package/dist/dev/lifecycle/commit-type/commit-type.d.ts +0 -22
  42. package/dist/dev/lifecycle/commit-type/commit-type.d.ts.map +0 -1
  43. package/dist/dev/lifecycle/commit-type/commit-type.js +0 -50
  44. package/dist/dev/lifecycle/commit-type/commit-type.js.map +0 -1
  45. package/dist/dev/lifecycle/commit-type/index.d.ts +0 -2
  46. package/dist/dev/lifecycle/commit-type/index.d.ts.map +0 -1
  47. package/dist/dev/lifecycle/commit-type/index.js +0 -2
  48. package/dist/dev/lifecycle/commit-type/index.js.map +0 -1
  49. package/dist/dev/lifecycle/cost/cost.d.ts +0 -28
  50. package/dist/dev/lifecycle/cost/cost.d.ts.map +0 -1
  51. package/dist/dev/lifecycle/cost/cost.js +0 -36
  52. package/dist/dev/lifecycle/cost/cost.js.map +0 -1
  53. package/dist/dev/lifecycle/deliver-epic/deliver-epic.d.ts +0 -44
  54. package/dist/dev/lifecycle/deliver-epic/deliver-epic.d.ts.map +0 -1
  55. package/dist/dev/lifecycle/deliver-epic/deliver-epic.js +0 -75
  56. package/dist/dev/lifecycle/deliver-epic/deliver-epic.js.map +0 -1
  57. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.d.ts +0 -51
  58. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.d.ts.map +0 -1
  59. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.js +0 -132
  60. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.js.map +0 -1
  61. package/dist/dev/lifecycle/epic/epic.d.ts +0 -66
  62. package/dist/dev/lifecycle/epic/epic.d.ts.map +0 -1
  63. package/dist/dev/lifecycle/epic/epic.js +0 -91
  64. package/dist/dev/lifecycle/epic/epic.js.map +0 -1
  65. package/dist/dev/lifecycle/epic/index.d.ts +0 -2
  66. package/dist/dev/lifecycle/epic/index.d.ts.map +0 -1
  67. package/dist/dev/lifecycle/epic/index.js +0 -2
  68. package/dist/dev/lifecycle/epic/index.js.map +0 -1
  69. package/dist/dev/lifecycle/feasibility/feasibility.d.ts +0 -55
  70. package/dist/dev/lifecycle/feasibility/feasibility.d.ts.map +0 -1
  71. package/dist/dev/lifecycle/feasibility/feasibility.js +0 -75
  72. package/dist/dev/lifecycle/feasibility/feasibility.js.map +0 -1
  73. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.d.ts +0 -49
  74. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.d.ts.map +0 -1
  75. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.js +0 -81
  76. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.js.map +0 -1
  77. package/dist/dev/lifecycle/format/format.d.ts +0 -11
  78. package/dist/dev/lifecycle/format/format.d.ts.map +0 -1
  79. package/dist/dev/lifecycle/format/format.js +0 -23
  80. package/dist/dev/lifecycle/format/format.js.map +0 -1
  81. package/dist/dev/lifecycle/lock/index.d.ts +0 -3
  82. package/dist/dev/lifecycle/lock/index.d.ts.map +0 -1
  83. package/dist/dev/lifecycle/lock/index.js +0 -2
  84. package/dist/dev/lifecycle/lock/index.js.map +0 -1
  85. package/dist/dev/lifecycle/lock/lock.d.ts +0 -68
  86. package/dist/dev/lifecycle/lock/lock.d.ts.map +0 -1
  87. package/dist/dev/lifecycle/lock/lock.js +0 -125
  88. package/dist/dev/lifecycle/lock/lock.js.map +0 -1
  89. package/dist/dev/lifecycle/outcome/index.d.ts +0 -2
  90. package/dist/dev/lifecycle/outcome/index.d.ts.map +0 -1
  91. package/dist/dev/lifecycle/outcome/index.js +0 -2
  92. package/dist/dev/lifecycle/outcome/index.js.map +0 -1
  93. package/dist/dev/lifecycle/outcome/outcome.d.ts +0 -65
  94. package/dist/dev/lifecycle/outcome/outcome.d.ts.map +0 -1
  95. package/dist/dev/lifecycle/outcome/outcome.js +0 -61
  96. package/dist/dev/lifecycle/outcome/outcome.js.map +0 -1
  97. package/dist/dev/lifecycle/pr-creation/index.d.ts +0 -3
  98. package/dist/dev/lifecycle/pr-creation/index.d.ts.map +0 -1
  99. package/dist/dev/lifecycle/pr-creation/index.js +0 -2
  100. package/dist/dev/lifecycle/pr-creation/index.js.map +0 -1
  101. package/dist/dev/lifecycle/pr-creation/pr-creation.d.ts +0 -47
  102. package/dist/dev/lifecycle/pr-creation/pr-creation.d.ts.map +0 -1
  103. package/dist/dev/lifecycle/pr-creation/pr-creation.js +0 -143
  104. package/dist/dev/lifecycle/pr-creation/pr-creation.js.map +0 -1
  105. package/dist/dev/lifecycle/preflight/preflight.d.ts +0 -42
  106. package/dist/dev/lifecycle/preflight/preflight.d.ts.map +0 -1
  107. package/dist/dev/lifecycle/preflight/preflight.js +0 -101
  108. package/dist/dev/lifecycle/preflight/preflight.js.map +0 -1
  109. package/dist/dev/lifecycle/progress/index.d.ts +0 -3
  110. package/dist/dev/lifecycle/progress/index.d.ts.map +0 -1
  111. package/dist/dev/lifecycle/progress/index.js +0 -2
  112. package/dist/dev/lifecycle/progress/index.js.map +0 -1
  113. package/dist/dev/lifecycle/progress/progress.d.ts +0 -98
  114. package/dist/dev/lifecycle/progress/progress.d.ts.map +0 -1
  115. package/dist/dev/lifecycle/progress/progress.js +0 -212
  116. package/dist/dev/lifecycle/progress/progress.js.map +0 -1
  117. package/dist/dev/lifecycle/pull-request/azdo/azdo.d.ts +0 -86
  118. package/dist/dev/lifecycle/pull-request/azdo/azdo.d.ts.map +0 -1
  119. package/dist/dev/lifecycle/pull-request/azdo/azdo.js +0 -198
  120. package/dist/dev/lifecycle/pull-request/azdo/azdo.js.map +0 -1
  121. package/dist/dev/lifecycle/pull-request/azdo/index.d.ts +0 -2
  122. package/dist/dev/lifecycle/pull-request/azdo/index.d.ts.map +0 -1
  123. package/dist/dev/lifecycle/pull-request/azdo/index.js +0 -2
  124. package/dist/dev/lifecycle/pull-request/azdo/index.js.map +0 -1
  125. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.d.ts +0 -85
  126. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.d.ts.map +0 -1
  127. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.js +0 -158
  128. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.js.map +0 -1
  129. package/dist/dev/lifecycle/pull-request/bitbucket/index.d.ts +0 -3
  130. package/dist/dev/lifecycle/pull-request/bitbucket/index.d.ts.map +0 -1
  131. package/dist/dev/lifecycle/pull-request/bitbucket/index.js +0 -3
  132. package/dist/dev/lifecycle/pull-request/bitbucket/index.js.map +0 -1
  133. package/dist/dev/lifecycle/pull-request/bitbucket/server.d.ts +0 -85
  134. package/dist/dev/lifecycle/pull-request/bitbucket/server.d.ts.map +0 -1
  135. package/dist/dev/lifecycle/pull-request/bitbucket/server.js +0 -168
  136. package/dist/dev/lifecycle/pull-request/bitbucket/server.js.map +0 -1
  137. package/dist/dev/lifecycle/pull-request/github/github.d.ts +0 -107
  138. package/dist/dev/lifecycle/pull-request/github/github.d.ts.map +0 -1
  139. package/dist/dev/lifecycle/pull-request/github/github.js +0 -225
  140. package/dist/dev/lifecycle/pull-request/github/github.js.map +0 -1
  141. package/dist/dev/lifecycle/pull-request/github/index.d.ts +0 -2
  142. package/dist/dev/lifecycle/pull-request/github/index.d.ts.map +0 -1
  143. package/dist/dev/lifecycle/pull-request/github/index.js +0 -2
  144. package/dist/dev/lifecycle/pull-request/github/index.js.map +0 -1
  145. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.d.ts +0 -103
  146. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.d.ts.map +0 -1
  147. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.js +0 -215
  148. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.js.map +0 -1
  149. package/dist/dev/lifecycle/pull-request/gitlab/index.d.ts +0 -2
  150. package/dist/dev/lifecycle/pull-request/gitlab/index.d.ts.map +0 -1
  151. package/dist/dev/lifecycle/pull-request/gitlab/index.js +0 -2
  152. package/dist/dev/lifecycle/pull-request/gitlab/index.js.map +0 -1
  153. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.d.ts +0 -44
  154. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.d.ts.map +0 -1
  155. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.js +0 -64
  156. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.js.map +0 -1
  157. package/dist/dev/lifecycle/pull-request/pr-body/index.d.ts +0 -3
  158. package/dist/dev/lifecycle/pull-request/pr-body/index.d.ts.map +0 -1
  159. package/dist/dev/lifecycle/pull-request/pr-body/index.js +0 -2
  160. package/dist/dev/lifecycle/pull-request/pr-body/index.js.map +0 -1
  161. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.d.ts +0 -65
  162. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.d.ts.map +0 -1
  163. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.js +0 -144
  164. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.js.map +0 -1
  165. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.d.ts +0 -30
  166. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.d.ts.map +0 -1
  167. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.js +0 -39
  168. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.js.map +0 -1
  169. package/dist/dev/lifecycle/quality/quality.d.ts +0 -99
  170. package/dist/dev/lifecycle/quality/quality.d.ts.map +0 -1
  171. package/dist/dev/lifecycle/quality/quality.js +0 -213
  172. package/dist/dev/lifecycle/quality/quality.js.map +0 -1
  173. package/dist/dev/lifecycle/resume/resume.d.ts +0 -64
  174. package/dist/dev/lifecycle/resume/resume.d.ts.map +0 -1
  175. package/dist/dev/lifecycle/resume/resume.js +0 -171
  176. package/dist/dev/lifecycle/resume/resume.js.map +0 -1
  177. package/dist/dev/lifecycle/rework/rework-builders.d.ts +0 -20
  178. package/dist/dev/lifecycle/rework/rework-builders.d.ts.map +0 -1
  179. package/dist/dev/lifecycle/rework/rework-builders.js +0 -203
  180. package/dist/dev/lifecycle/rework/rework-builders.js.map +0 -1
  181. package/dist/dev/lifecycle/rework/rework-handlers.d.ts +0 -50
  182. package/dist/dev/lifecycle/rework/rework-handlers.d.ts.map +0 -1
  183. package/dist/dev/lifecycle/rework/rework-handlers.js +0 -41
  184. package/dist/dev/lifecycle/rework/rework-handlers.js.map +0 -1
  185. package/dist/dev/lifecycle/rework/rework.d.ts +0 -63
  186. package/dist/dev/lifecycle/rework/rework.d.ts.map +0 -1
  187. package/dist/dev/lifecycle/rework/rework.js +0 -141
  188. package/dist/dev/lifecycle/rework/rework.js.map +0 -1
  189. package/dist/dev/pipeline/context.d.ts +0 -105
  190. package/dist/dev/pipeline/context.d.ts.map +0 -1
  191. package/dist/dev/pipeline/context.js +0 -107
  192. package/dist/dev/pipeline/context.js.map +0 -1
  193. package/dist/dev/pipeline/index.d.ts +0 -6
  194. package/dist/dev/pipeline/index.d.ts.map +0 -1
  195. package/dist/dev/pipeline/index.js +0 -5
  196. package/dist/dev/pipeline/index.js.map +0 -1
  197. package/dist/dev/pipeline/phases/branch-setup/branch-setup.d.ts +0 -62
  198. package/dist/dev/pipeline/phases/branch-setup/branch-setup.d.ts.map +0 -1
  199. package/dist/dev/pipeline/phases/branch-setup/branch-setup.js +0 -128
  200. package/dist/dev/pipeline/phases/branch-setup/branch-setup.js.map +0 -1
  201. package/dist/dev/pipeline/phases/branch-setup/index.d.ts +0 -3
  202. package/dist/dev/pipeline/phases/branch-setup/index.d.ts.map +0 -1
  203. package/dist/dev/pipeline/phases/branch-setup/index.js +0 -2
  204. package/dist/dev/pipeline/phases/branch-setup/index.js.map +0 -1
  205. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.d.ts +0 -32
  206. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.d.ts.map +0 -1
  207. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.js +0 -32
  208. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.js.map +0 -1
  209. package/dist/dev/pipeline/phases/cleanup-phase/index.d.ts +0 -3
  210. package/dist/dev/pipeline/phases/cleanup-phase/index.d.ts.map +0 -1
  211. package/dist/dev/pipeline/phases/cleanup-phase/index.js +0 -2
  212. package/dist/dev/pipeline/phases/cleanup-phase/index.js.map +0 -1
  213. package/dist/dev/pipeline/phases/cost-phase/cost-phase.d.ts +0 -40
  214. package/dist/dev/pipeline/phases/cost-phase/cost-phase.d.ts.map +0 -1
  215. package/dist/dev/pipeline/phases/cost-phase/cost-phase.js +0 -43
  216. package/dist/dev/pipeline/phases/cost-phase/cost-phase.js.map +0 -1
  217. package/dist/dev/pipeline/phases/cost-phase/index.d.ts +0 -3
  218. package/dist/dev/pipeline/phases/cost-phase/index.d.ts.map +0 -1
  219. package/dist/dev/pipeline/phases/cost-phase/index.js +0 -2
  220. package/dist/dev/pipeline/phases/cost-phase/index.js.map +0 -1
  221. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.d.ts +0 -68
  222. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.d.ts.map +0 -1
  223. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.js +0 -125
  224. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.js.map +0 -1
  225. package/dist/dev/pipeline/phases/deliver-phase/index.d.ts +0 -3
  226. package/dist/dev/pipeline/phases/deliver-phase/index.d.ts.map +0 -1
  227. package/dist/dev/pipeline/phases/deliver-phase/index.js +0 -2
  228. package/dist/dev/pipeline/phases/deliver-phase/index.js.map +0 -1
  229. package/dist/dev/pipeline/phases/dry-run/dry-run.d.ts +0 -38
  230. package/dist/dev/pipeline/phases/dry-run/dry-run.d.ts.map +0 -1
  231. package/dist/dev/pipeline/phases/dry-run/dry-run.js +0 -33
  232. package/dist/dev/pipeline/phases/dry-run/dry-run.js.map +0 -1
  233. package/dist/dev/pipeline/phases/dry-run/index.d.ts +0 -2
  234. package/dist/dev/pipeline/phases/dry-run/index.d.ts.map +0 -1
  235. package/dist/dev/pipeline/phases/dry-run/index.js +0 -2
  236. package/dist/dev/pipeline/phases/dry-run/index.js.map +0 -1
  237. package/dist/dev/pipeline/phases/epic-completion/epic-completion.d.ts +0 -48
  238. package/dist/dev/pipeline/phases/epic-completion/epic-completion.d.ts.map +0 -1
  239. package/dist/dev/pipeline/phases/epic-completion/epic-completion.js +0 -42
  240. package/dist/dev/pipeline/phases/epic-completion/epic-completion.js.map +0 -1
  241. package/dist/dev/pipeline/phases/epic-completion/index.d.ts +0 -3
  242. package/dist/dev/pipeline/phases/epic-completion/index.d.ts.map +0 -1
  243. package/dist/dev/pipeline/phases/epic-completion/index.js +0 -2
  244. package/dist/dev/pipeline/phases/epic-completion/index.js.map +0 -1
  245. package/dist/dev/pipeline/phases/feasibility/feasibility.d.ts +0 -52
  246. package/dist/dev/pipeline/phases/feasibility/feasibility.d.ts.map +0 -1
  247. package/dist/dev/pipeline/phases/feasibility/feasibility.js +0 -34
  248. package/dist/dev/pipeline/phases/feasibility/feasibility.js.map +0 -1
  249. package/dist/dev/pipeline/phases/feasibility/index.d.ts +0 -3
  250. package/dist/dev/pipeline/phases/feasibility/index.d.ts.map +0 -1
  251. package/dist/dev/pipeline/phases/feasibility/index.js +0 -2
  252. package/dist/dev/pipeline/phases/feasibility/index.js.map +0 -1
  253. package/dist/dev/pipeline/phases/index.d.ts +0 -26
  254. package/dist/dev/pipeline/phases/index.d.ts.map +0 -1
  255. package/dist/dev/pipeline/phases/index.js +0 -14
  256. package/dist/dev/pipeline/phases/index.js.map +0 -1
  257. package/dist/dev/pipeline/phases/lock-check/index.d.ts +0 -3
  258. package/dist/dev/pipeline/phases/lock-check/index.d.ts.map +0 -1
  259. package/dist/dev/pipeline/phases/lock-check/index.js +0 -2
  260. package/dist/dev/pipeline/phases/lock-check/index.js.map +0 -1
  261. package/dist/dev/pipeline/phases/lock-check/lock-check.d.ts +0 -55
  262. package/dist/dev/pipeline/phases/lock-check/lock-check.d.ts.map +0 -1
  263. package/dist/dev/pipeline/phases/lock-check/lock-check.js +0 -60
  264. package/dist/dev/pipeline/phases/lock-check/lock-check.js.map +0 -1
  265. package/dist/dev/pipeline/phases/pr-retry/index.d.ts +0 -3
  266. package/dist/dev/pipeline/phases/pr-retry/index.d.ts.map +0 -1
  267. package/dist/dev/pipeline/phases/pr-retry/index.js +0 -2
  268. package/dist/dev/pipeline/phases/pr-retry/index.js.map +0 -1
  269. package/dist/dev/pipeline/phases/pr-retry/pr-retry.d.ts +0 -58
  270. package/dist/dev/pipeline/phases/pr-retry/pr-retry.d.ts.map +0 -1
  271. package/dist/dev/pipeline/phases/pr-retry/pr-retry.js +0 -82
  272. package/dist/dev/pipeline/phases/pr-retry/pr-retry.js.map +0 -1
  273. package/dist/dev/pipeline/phases/preflight-phase/index.d.ts +0 -3
  274. package/dist/dev/pipeline/phases/preflight-phase/index.d.ts.map +0 -1
  275. package/dist/dev/pipeline/phases/preflight-phase/index.js +0 -2
  276. package/dist/dev/pipeline/phases/preflight-phase/index.js.map +0 -1
  277. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.d.ts +0 -42
  278. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.d.ts.map +0 -1
  279. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.js +0 -41
  280. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.js.map +0 -1
  281. package/dist/dev/pipeline/phases/rework-detection/index.d.ts +0 -3
  282. package/dist/dev/pipeline/phases/rework-detection/index.d.ts.map +0 -1
  283. package/dist/dev/pipeline/phases/rework-detection/index.js +0 -2
  284. package/dist/dev/pipeline/phases/rework-detection/index.js.map +0 -1
  285. package/dist/dev/pipeline/phases/rework-detection/rework-detection.d.ts +0 -40
  286. package/dist/dev/pipeline/phases/rework-detection/rework-detection.d.ts.map +0 -1
  287. package/dist/dev/pipeline/phases/rework-detection/rework-detection.js +0 -38
  288. package/dist/dev/pipeline/phases/rework-detection/rework-detection.js.map +0 -1
  289. package/dist/dev/pipeline/phases/ticket-fetch/index.d.ts +0 -3
  290. package/dist/dev/pipeline/phases/ticket-fetch/index.d.ts.map +0 -1
  291. package/dist/dev/pipeline/phases/ticket-fetch/index.js +0 -2
  292. package/dist/dev/pipeline/phases/ticket-fetch/index.js.map +0 -1
  293. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.d.ts +0 -46
  294. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.d.ts.map +0 -1
  295. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.js +0 -64
  296. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.js.map +0 -1
  297. package/dist/dev/pipeline/phases/transition/index.d.ts +0 -3
  298. package/dist/dev/pipeline/phases/transition/index.d.ts.map +0 -1
  299. package/dist/dev/pipeline/phases/transition/index.js +0 -2
  300. package/dist/dev/pipeline/phases/transition/index.js.map +0 -1
  301. package/dist/dev/pipeline/phases/transition/transition.d.ts +0 -30
  302. package/dist/dev/pipeline/phases/transition/transition.d.ts.map +0 -1
  303. package/dist/dev/pipeline/phases/transition/transition.js +0 -27
  304. package/dist/dev/pipeline/phases/transition/transition.js.map +0 -1
  305. package/dist/dev/pipeline/run-pipeline.d.ts +0 -98
  306. package/dist/dev/pipeline/run-pipeline.d.ts.map +0 -1
  307. package/dist/dev/pipeline/run-pipeline.js +0 -106
  308. package/dist/dev/pipeline/run-pipeline.js.map +0 -1
@@ -1,125 +0,0 @@
1
- /**
2
- * Lock file management for `.clancy/lock.json`.
3
- *
4
- * Prevents double-runs and provides context for hooks
5
- * (PostCompact, time guard, cost tracker).
6
- */
7
- import { join } from 'node:path';
8
- import { z } from 'zod/mini';
9
- const lockDataSchema = z.object({
10
- pid: z.number(),
11
- ticketKey: z.string(),
12
- ticketTitle: z.string(),
13
- ticketBranch: z.string(),
14
- targetBranch: z.string(),
15
- parentKey: z.string(),
16
- description: z.optional(z.string()),
17
- startedAt: z.string().check(z.minLength(1)),
18
- });
19
- const CLANCY_DIR = '.clancy';
20
- const LOCK_FILE = 'lock.json';
21
- const LOCK_PATH = `${CLANCY_DIR}/${LOCK_FILE}`;
22
- const VERIFY_ATTEMPT_PATH = `${CLANCY_DIR}/verify-attempt.txt`;
23
- const TWENTY_FOUR_HOURS = 24 * 60 * 60 * 1000;
24
- // ─── Public API ──────────────────────────────────────────────────────────────
25
- /**
26
- * Write lock data to `.clancy/lock.json`.
27
- *
28
- * @param fs - Injected filesystem operations.
29
- * @param projectRoot - The root directory of the project.
30
- * @param data - Lock data to persist.
31
- * @returns Nothing. Creates the `.clancy` directory if needed.
32
- */
33
- export function writeLock(fs, projectRoot, data) {
34
- fs.mkdir(join(projectRoot, CLANCY_DIR));
35
- fs.writeFile(join(projectRoot, LOCK_PATH), JSON.stringify(data, null, 2));
36
- }
37
- /**
38
- * Read lock data from `.clancy/lock.json`.
39
- *
40
- * @param fs - Injected filesystem operations.
41
- * @param projectRoot - The root directory of the project.
42
- * @returns Parsed lock data, or `undefined` if missing/corrupt/invalid.
43
- */
44
- export function readLock(fs, projectRoot) {
45
- try {
46
- const raw = JSON.parse(fs.readFile(join(projectRoot, LOCK_PATH)));
47
- const result = lockDataSchema.safeParse(raw);
48
- return result.success ? result.data : undefined;
49
- }
50
- catch {
51
- return undefined;
52
- }
53
- }
54
- /**
55
- * Delete `.clancy/lock.json`. No-op if the file does not exist.
56
- *
57
- * @param fs - Injected filesystem operations.
58
- * @param projectRoot - The root directory of the project.
59
- * @returns Nothing.
60
- */
61
- export function deleteLock(fs, projectRoot) {
62
- try {
63
- fs.deleteFile(join(projectRoot, LOCK_PATH));
64
- }
65
- catch (err) {
66
- const isNotFound = err instanceof Error && 'code' in err && err.code === 'ENOENT';
67
- if (!isNotFound)
68
- throw err;
69
- }
70
- }
71
- /**
72
- * Check whether a process is still running.
73
- *
74
- * Uses signal 0 (no-op) to probe the process. Treats `EPERM` as alive
75
- * because the process exists but we lack permission to signal it.
76
- *
77
- * @returns `true` if the process is alive.
78
- */
79
- function isPidAlive(pid) {
80
- try {
81
- process.kill(pid, 0);
82
- return true;
83
- }
84
- catch (err) {
85
- // EPERM = process exists but we can't signal it — still alive
86
- if (err instanceof Error && 'code' in err && err.code === 'EPERM') {
87
- return true;
88
- }
89
- return false;
90
- }
91
- }
92
- /**
93
- * Delete `.clancy/verify-attempt.txt`. No-op if the file does not exist.
94
- *
95
- * @param fs - Injected filesystem operations.
96
- * @param projectRoot - The root directory of the project.
97
- * @returns Nothing.
98
- */
99
- export function deleteVerifyAttempt(fs, projectRoot) {
100
- try {
101
- fs.deleteFile(join(projectRoot, VERIFY_ATTEMPT_PATH));
102
- }
103
- catch (err) {
104
- const isNotFound = err instanceof Error && 'code' in err && err.code === 'ENOENT';
105
- if (!isNotFound)
106
- throw err;
107
- }
108
- }
109
- /**
110
- * Determine whether a lock is stale (safe to reclaim).
111
- *
112
- * A lock is stale when its owning PID is dead, when its age exceeds 24 hours
113
- * (guards against PID reuse), or when its timestamp is invalid.
114
- *
115
- * @returns `true` if the lock should be treated as abandoned.
116
- */
117
- export function isLockStale(lock) {
118
- if (!isPidAlive(lock.pid))
119
- return true;
120
- const lockAge = Date.now() - new Date(lock.startedAt).getTime();
121
- if (Number.isNaN(lockAge))
122
- return true;
123
- return lockAge > TWENTY_FOUR_HOURS;
124
- }
125
- //# sourceMappingURL=lock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../../src/dev/lifecycle/lock/lock.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAgB7B,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;I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CAAC,IAAI,KAAK,QAAQ,CAAC;QACjE,IAAI,CAAC,UAAU;YAAE,MAAM,GAAG,CAAC;IAC7B,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,IAAc;IACxC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;IAChE,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,OAAO,GAAG,iBAAiB,CAAC;AACrC,CAAC"}
@@ -1,2 +0,0 @@
1
- export { computeDeliveryOutcome, progressForOutcome } from './outcome.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dev/lifecycle/outcome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export { computeDeliveryOutcome, progressForOutcome } from './outcome.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dev/lifecycle/outcome/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,65 +0,0 @@
1
- /**
2
- * Pure outcome computation for delivery results.
3
- *
4
- * Replaces if/else chains in delivery orchestration with a
5
- * discriminated union. The orchestrator switches on `type` for
6
- * logging and progress, keeping side effects separate from decisions.
7
- */
8
- import type { ProgressStatus } from '../../../types/progress.js';
9
- import type { PrCreationResult, RemoteInfo } from '../../../types/remote.js';
10
- /** PR was created successfully. */
11
- type CreatedOutcome = {
12
- readonly type: 'created';
13
- readonly url: string;
14
- readonly number: number;
15
- };
16
- /** PR creation failed — includes error and optional manual URL. */
17
- type FailedOutcome = {
18
- readonly type: 'failed';
19
- readonly error: string;
20
- readonly manualUrl?: string;
21
- };
22
- /** PR creation was not attempted — includes optional manual URL. */
23
- type NotAttemptedOutcome = {
24
- readonly type: 'not_attempted';
25
- readonly manualUrl?: string;
26
- };
27
- /** Discriminated union of all possible delivery outcomes after push succeeds. */
28
- type DeliveryOutcome = CreatedOutcome | {
29
- readonly type: 'exists';
30
- } | FailedOutcome | NotAttemptedOutcome | {
31
- readonly type: 'local';
32
- } | {
33
- readonly type: 'unsupported';
34
- };
35
- /** Options for {@link computeDeliveryOutcome}. */
36
- type ComputeOutcomeOpts = {
37
- readonly pr: PrCreationResult | undefined;
38
- readonly remote: RemoteInfo;
39
- readonly sourceBranch: string;
40
- readonly targetBranch: string;
41
- };
42
- /**
43
- * Compute the delivery outcome from a PR creation result and remote info.
44
- *
45
- * Pure function — no side effects, no I/O. The caller handles logging
46
- * and progress based on the returned outcome type.
47
- *
48
- * @param opts - The PR result, remote info, and branch names.
49
- * @returns The delivery outcome.
50
- */
51
- export declare function computeDeliveryOutcome(opts: ComputeOutcomeOpts): DeliveryOutcome;
52
- /**
53
- * Map a delivery outcome to the progress status and optional PR number.
54
- *
55
- * Pure function — used by the orchestrator to log progress after delivery.
56
- *
57
- * @param outcome - The delivery outcome.
58
- * @returns The progress status and optional PR number.
59
- */
60
- export declare function progressForOutcome(outcome: DeliveryOutcome): {
61
- readonly status: ProgressStatus;
62
- readonly prNumber?: number;
63
- };
64
- export {};
65
- //# sourceMappingURL=outcome.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"outcome.d.ts","sourceRoot":"","sources":["../../../../src/dev/lifecycle/outcome/outcome.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO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D,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAgBA"}
@@ -1,61 +0,0 @@
1
- import { buildManualPrUrl } from '../../../dev/lifecycle/pr-creation/index.js';
2
- // ─── Public API ──────────────────────────────────────────────────────────────
3
- /**
4
- * Compute the delivery outcome from a PR creation result and remote info.
5
- *
6
- * Pure function — no side effects, no I/O. The caller handles logging
7
- * and progress based on the returned outcome type.
8
- *
9
- * @param opts - The PR result, remote info, and branch names.
10
- * @returns The delivery outcome.
11
- */
12
- export function computeDeliveryOutcome(opts) {
13
- const { pr, remote, sourceBranch, targetBranch } = opts;
14
- if (remote.host === 'none')
15
- return { type: 'local' };
16
- if (remote.host === 'unknown')
17
- return { type: 'unsupported' };
18
- if (pr?.ok) {
19
- return { type: 'created', url: pr.url, number: pr.number };
20
- }
21
- if (pr && !pr.ok && pr.alreadyExists) {
22
- return { type: 'exists' };
23
- }
24
- if (pr && !pr.ok) {
25
- return {
26
- type: 'failed',
27
- error: pr.error,
28
- manualUrl: buildManualPrUrl(remote, sourceBranch, targetBranch),
29
- };
30
- }
31
- return {
32
- type: 'not_attempted',
33
- manualUrl: buildManualPrUrl(remote, sourceBranch, targetBranch),
34
- };
35
- }
36
- /**
37
- * Map a delivery outcome to the progress status and optional PR number.
38
- *
39
- * Pure function — used by the orchestrator to log progress after delivery.
40
- *
41
- * @param outcome - The delivery outcome.
42
- * @returns The progress status and optional PR number.
43
- */
44
- export function progressForOutcome(outcome) {
45
- switch (outcome.type) {
46
- case 'created':
47
- return { status: 'PR_CREATED', prNumber: outcome.number };
48
- case 'local':
49
- return { status: 'LOCAL' };
50
- case 'exists':
51
- case 'failed':
52
- case 'not_attempted':
53
- case 'unsupported':
54
- return { status: 'PUSHED' };
55
- default: {
56
- const _exhaustive = outcome;
57
- return _exhaustive;
58
- }
59
- }
60
- }
61
- //# sourceMappingURL=outcome.js.map
@@ -1 +0,0 @@
1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AI,EAAE,CAAC;QACrB,KAAK,SAAS;YACZ,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QAC5D,KAAK,OAAO;YACV,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAC7B,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,eAAe,CAAC;QACrB,KAAK,aAAa;YAChB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QAC9B,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,OAAO,CAAC;YACnC,OAAO,WAAW,CAAC;QACrB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- export type { FetchFn } from './pr-creation.js';
2
- export { attemptPrCreation, buildManualPrUrl } from './pr-creation.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dev/lifecycle/pr-creation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { attemptPrCreation, buildManualPrUrl } from './pr-creation.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dev/lifecycle/pr-creation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,47 +0,0 @@
1
- /**
2
- * Platform-dispatched PR/MR creation.
3
- *
4
- * Single entry point that resolves credentials, detects platform, and
5
- * delegates to the appropriate platform-specific creation function.
6
- * Also provides {@link buildManualPrUrl} for fallback URLs.
7
- */
8
- import type { SharedEnv } from '../../../schemas/env/env.js';
9
- import type { PrCreationResult, RemoteInfo } from '../../../types/remote.js';
10
- /** Minimal fetch signature for platform API calls. */
11
- export type FetchFn = (url: string, init: RequestInit) => Promise<Response>;
12
- /** Options for {@link attemptPrCreation}. */
13
- type AttemptPrOpts = {
14
- readonly fetchFn: FetchFn;
15
- readonly env: SharedEnv;
16
- readonly remote: RemoteInfo;
17
- readonly sourceBranch: string;
18
- readonly targetBranch: string;
19
- readonly title: string;
20
- readonly body: string;
21
- };
22
- /**
23
- * Attempt to create a PR/MR on the detected remote platform.
24
- *
25
- * Resolves credentials and API base URL, then dispatches to the
26
- * platform-specific creation function. Returns `undefined` if
27
- * credentials are missing, the platform has no API base, or the
28
- * remote is unsupported.
29
- *
30
- * @param opts - PR creation options with DI dependencies.
31
- * @returns The PR creation result, or `undefined` if not attempted.
32
- */
33
- export declare function attemptPrCreation(opts: AttemptPrOpts): Promise<PrCreationResult | undefined>;
34
- /**
35
- * Build a manual PR/MR creation URL for the user to click.
36
- *
37
- * Generates a pre-filled URL for the platform's web UI. Returns
38
- * `undefined` for platforms without a known URL pattern (unknown, none).
39
- *
40
- * @param remote - The detected remote info.
41
- * @param sourceBranch - The source branch name.
42
- * @param targetBranch - The target branch name.
43
- * @returns The manual URL, or `undefined`.
44
- */
45
- export declare function buildManualPrUrl(remote: RemoteInfo, sourceBranch: string, targetBranch: string): string | undefined;
46
- export {};
47
- //# sourceMappingURL=pr-creation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pr-creation.d.ts","sourceRoot":"","sources":["../../../../src/dev/lifecycle/pr-creation/pr-creation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAMV,gBAAgB,EAChB,UAAU,EACX,MAAM,qBAAqB,CAAC;AAc7B,sDAAsD;AACtD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5E,6CAA6C;AAC7C,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAIF;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CA8BvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,SAAS,CAkBpB"}
@@ -1,143 +0,0 @@
1
- import { createPullRequest as createAzdoPr } from '../../../dev/lifecycle/pull-request/azdo/index.js';
2
- import { createPullRequest as createBbCloudPr, createServerPullRequest as createBbServerPr, } from '../../../dev/lifecycle/pull-request/bitbucket/index.js';
3
- import { createPullRequest as createGitHubPr } from '../../../dev/lifecycle/pull-request/github/index.js';
4
- import { createMergeRequest as createGitLabMr } from '../../../dev/lifecycle/pull-request/gitlab/index.js';
5
- import { resolveGitToken } from '../../../shared/git-token/index.js';
6
- import { buildApiBaseUrl } from '../../../shared/remote/index.js';
7
- // ─── Public API ──────────────────────────────────────────────────────────────
8
- /**
9
- * Attempt to create a PR/MR on the detected remote platform.
10
- *
11
- * Resolves credentials and API base URL, then dispatches to the
12
- * platform-specific creation function. Returns `undefined` if
13
- * credentials are missing, the platform has no API base, or the
14
- * remote is unsupported.
15
- *
16
- * @param opts - PR creation options with DI dependencies.
17
- * @returns The PR creation result, or `undefined` if not attempted.
18
- */
19
- export async function attemptPrCreation(opts) {
20
- const { env, remote } = opts;
21
- const creds = resolveGitToken(env, remote);
22
- if (!creds)
23
- return undefined;
24
- const apiBase = buildApiBaseUrl(remote, env.CLANCY_GIT_API_URL);
25
- if (!apiBase)
26
- return undefined;
27
- const ctx = {
28
- fetchFn: opts.fetchFn,
29
- creds,
30
- apiBase,
31
- branch: opts,
32
- };
33
- switch (remote.host) {
34
- case 'github':
35
- return dispatchGitHub(ctx, remote);
36
- case 'gitlab':
37
- return dispatchGitLab(ctx, remote);
38
- case 'bitbucket':
39
- return dispatchBbCloud(ctx, remote);
40
- case 'bitbucket-server':
41
- return dispatchBbServer(ctx, remote);
42
- case 'azure':
43
- return dispatchAzdo(ctx, remote);
44
- default:
45
- return undefined;
46
- }
47
- }
48
- /**
49
- * Build a manual PR/MR creation URL for the user to click.
50
- *
51
- * Generates a pre-filled URL for the platform's web UI. Returns
52
- * `undefined` for platforms without a known URL pattern (unknown, none).
53
- *
54
- * @param remote - The detected remote info.
55
- * @param sourceBranch - The source branch name.
56
- * @param targetBranch - The target branch name.
57
- * @returns The manual URL, or `undefined`.
58
- */
59
- export function buildManualPrUrl(remote, sourceBranch, targetBranch) {
60
- const src = encodeURIComponent(sourceBranch);
61
- const tgt = encodeURIComponent(targetBranch);
62
- switch (remote.host) {
63
- case 'github':
64
- return `https://${remote.hostname}/${encodeURIComponent(remote.owner)}/${encodeURIComponent(remote.repo)}/compare/${tgt}...${src}`;
65
- case 'gitlab':
66
- return `https://${remote.hostname}/${remote.projectPath}/-/merge_requests/new?merge_request[source_branch]=${src}&merge_request[target_branch]=${tgt}`;
67
- case 'bitbucket':
68
- return `https://${remote.hostname}/${encodeURIComponent(remote.workspace)}/${encodeURIComponent(remote.repoSlug)}/pull-requests/new?source=${src}&dest=${tgt}`;
69
- case 'bitbucket-server':
70
- return `https://${remote.hostname}/projects/${encodeURIComponent(remote.projectKey)}/repos/${encodeURIComponent(remote.repoSlug)}/pull-requests?create&sourceBranch=refs/heads/${src}&targetBranch=refs/heads/${tgt}`;
71
- case 'azure':
72
- return `https://${remote.hostname}/${encodeURIComponent(remote.org)}/${encodeURIComponent(remote.project)}/_git/${encodeURIComponent(remote.repo)}/pullrequestcreate?sourceRef=${src}&targetRef=${tgt}`;
73
- default:
74
- return undefined;
75
- }
76
- }
77
- function dispatchGitHub(ctx, remote) {
78
- return createGitHubPr({
79
- fetchFn: ctx.fetchFn,
80
- token: ctx.creds.token,
81
- repo: `${remote.owner}/${remote.repo}`,
82
- head: ctx.branch.sourceBranch,
83
- base: ctx.branch.targetBranch,
84
- title: ctx.branch.title,
85
- body: ctx.branch.body,
86
- apiBase: ctx.apiBase,
87
- });
88
- }
89
- function dispatchGitLab(ctx, remote) {
90
- return createGitLabMr({
91
- fetchFn: ctx.fetchFn,
92
- token: ctx.creds.token,
93
- apiBase: ctx.apiBase,
94
- projectPath: remote.projectPath,
95
- sourceBranch: ctx.branch.sourceBranch,
96
- targetBranch: ctx.branch.targetBranch,
97
- title: ctx.branch.title,
98
- description: ctx.branch.body,
99
- });
100
- }
101
- function dispatchBbCloud(ctx, remote) {
102
- const { username } = ctx.creds;
103
- if (!username)
104
- throw new Error('Bitbucket Cloud requires a username');
105
- return createBbCloudPr({
106
- fetchFn: ctx.fetchFn,
107
- username,
108
- token: ctx.creds.token,
109
- workspace: remote.workspace,
110
- repoSlug: remote.repoSlug,
111
- sourceBranch: ctx.branch.sourceBranch,
112
- targetBranch: ctx.branch.targetBranch,
113
- title: ctx.branch.title,
114
- description: ctx.branch.body,
115
- });
116
- }
117
- function dispatchBbServer(ctx, remote) {
118
- return createBbServerPr({
119
- fetchFn: ctx.fetchFn,
120
- token: ctx.creds.token,
121
- apiBase: ctx.apiBase,
122
- projectKey: remote.projectKey,
123
- repoSlug: remote.repoSlug,
124
- sourceBranch: ctx.branch.sourceBranch,
125
- targetBranch: ctx.branch.targetBranch,
126
- title: ctx.branch.title,
127
- description: ctx.branch.body,
128
- });
129
- }
130
- function dispatchAzdo(ctx, remote) {
131
- return createAzdoPr({
132
- fetchFn: ctx.fetchFn,
133
- org: remote.org,
134
- project: remote.project,
135
- repo: remote.repo,
136
- pat: ctx.creds.token,
137
- sourceBranch: ctx.branch.sourceBranch,
138
- targetBranch: ctx.branch.targetBranch,
139
- title: ctx.branch.title,
140
- description: ctx.branch.body,
141
- });
142
- }
143
- //# sourceMappingURL=pr-creation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pr-creation.js","sourceRoot":"","sources":["../../../../src/dev/lifecycle/pr-creation/pr-creation.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EACL,iBAAiB,IAAI,eAAe,EACpC,uBAAuB,IAAI,gBAAgB,GAC5C,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,iBAAiB,IAAI,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,kBAAkB,IAAI,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAkB7D,gFAAgF;AAEhF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAmB;IAEnB,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAE7B,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAChE,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAE/B,MAAM,GAAG,GAAgB;QACvB,OAAO,EAAE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W,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI;KAC7B,CAAC,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CACnB,GAAgB,EAChB,MAAkB;IAElB,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK;QACpB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY;QACrC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY;QACrC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK;QACvB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI;KAC7B,CAAC,CAAC;AACL,CAAC"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Preflight checks shared across pipeline scripts.
3
- *
4
- * Validates the environment before running a ticket:
5
- * required binaries, `.clancy/.env` file, git repository, and working
6
- * directory state. All I/O is dependency-injected for testability.
7
- */
8
- import type { EnvFileSystem } from '../../../shared/env-parser/index.js';
9
- /**
10
- * Execute a command by file name and return stdout.
11
- * Throws on non-zero exit. Unlike `ExecGit` (git-ops), this is not
12
- * scoped to git — it can run any binary.
13
- */
14
- type ExecCmd = (file: string, args: readonly string[]) => string;
15
- /** Injected dependencies for preflight checks. */
16
- export type PreflightDeps = {
17
- /** Execute a shell command (for binary checks and git state). */
18
- readonly exec: ExecCmd;
19
- /** File system operations for `.clancy/.env` loading. */
20
- readonly envFs: EnvFileSystem;
21
- };
22
- /** Result of running preflight checks. */
23
- export type PreflightResult = {
24
- readonly ok: boolean;
25
- readonly error: string | undefined;
26
- readonly warning: string | undefined;
27
- readonly env: Record<string, string> | undefined;
28
- };
29
- /**
30
- * Run all preflight checks common to every pipeline script.
31
- *
32
- * Checks for required binaries (`claude`, `git`), the `.clancy/.env` file,
33
- * git repository state, and uncommitted changes. Returns structured data
34
- * — no console output.
35
- *
36
- * @param projectRoot - The root directory of the project.
37
- * @param deps - Injected dependencies (exec, filesystem).
38
- * @returns A result with `ok`, optional `error`/`warning`, and parsed `env`.
39
- */
40
- export declare function runPreflight(projectRoot: string, deps: PreflightDeps): PreflightResult;
41
- export {};
42
- //# sourceMappingURL=preflight.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../../src/dev/lifecycle/preflight/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAOpE;;;;GAIG;AACH,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,MAAM,CAAC;AAEjE,kDAAkD;AAClD,MAAM,MAAM,aAAa,GAAG;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CAClD,CAAC;AAqEF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,aAAa,GAClB,eAAe,CAgCjB"}
@@ -1,101 +0,0 @@
1
- import { loadClancyEnv } from '../../../shared/env-parser/index.js';
2
- import { hasUncommittedChanges } from '../../../shared/git-ops/index.js';
3
- // ─── Helpers ─────────────────────────────────────────────────────────────────
4
- /**
5
- * Check whether a binary is available on the system PATH.
6
- *
7
- * Probes the binary with `--version` — works cross-platform (no `which`).
8
- *
9
- * @param exec - Injected command executor.
10
- * @param name - The binary name to check (e.g., `'git'`, `'claude'`).
11
- * @returns `true` if the binary is found.
12
- */
13
- function binaryExists(exec, name) {
14
- try {
15
- exec(name, ['--version']);
16
- return true;
17
- }
18
- catch {
19
- return false;
20
- }
21
- }
22
- /**
23
- * Check whether the current directory is inside a git repository.
24
- *
25
- * @param exec - Injected command executor.
26
- * @returns `true` if a `.git` directory is found.
27
- */
28
- function isGitRepo(exec) {
29
- try {
30
- exec('git', ['rev-parse', '--git-dir']);
31
- return true;
32
- }
33
- catch {
34
- return false;
35
- }
36
- }
37
- /** Check whether the remote origin is reachable (warning-only). */
38
- function isRemoteReachable(exec) {
39
- try {
40
- exec('git', ['ls-remote', 'origin', 'HEAD']);
41
- return true;
42
- }
43
- catch {
44
- return false;
45
- }
46
- }
47
- /** Collect non-blocking warnings about repository state. */
48
- function collectWarnings(exec) {
49
- const execGit = (args) => exec('git', args);
50
- const checks = [
51
- [
52
- !isRemoteReachable(exec),
53
- 'Could not reach origin. PR creation and rework detection may not work.',
54
- ],
55
- [
56
- hasUncommittedChanges(execGit),
57
- 'Working directory has uncommitted changes — they will be included in the branch.',
58
- ],
59
- ];
60
- const messages = checks.filter(([flag]) => flag).map(([, msg]) => msg);
61
- return messages.length > 0 ? messages.join('\n') : undefined;
62
- }
63
- // ─── Public API ──────────────────────────────────────────────────────────────
64
- /**
65
- * Run all preflight checks common to every pipeline script.
66
- *
67
- * Checks for required binaries (`claude`, `git`), the `.clancy/.env` file,
68
- * git repository state, and uncommitted changes. Returns structured data
69
- * — no console output.
70
- *
71
- * @param projectRoot - The root directory of the project.
72
- * @param deps - Injected dependencies (exec, filesystem).
73
- * @returns A result with `ok`, optional `error`/`warning`, and parsed `env`.
74
- */
75
- export function runPreflight(projectRoot, deps) {
76
- const fail = (error) => ({
77
- ok: false,
78
- error,
79
- warning: undefined,
80
- env: undefined,
81
- });
82
- // Check required binaries
83
- const REQUIRED_BINARIES = ['claude', 'git'];
84
- const missingBin = REQUIRED_BINARIES.find((b) => !binaryExists(deps.exec, b));
85
- if (missingBin) {
86
- return fail(`${missingBin} is required but not found`);
87
- }
88
- // Check .env file
89
- const env = loadClancyEnv(projectRoot, deps.envFs);
90
- if (!env) {
91
- return fail('.clancy/.env not found — run /clancy:init first');
92
- }
93
- // Check git repo
94
- if (!isGitRepo(deps.exec)) {
95
- return fail('Not inside a git repository');
96
- }
97
- // Collect non-blocking warnings
98
- const warning = collectWarnings(deps.exec);
99
- return { ok: true, env, error: undefined, warning };
100
- }
101
- //# sourceMappingURL=preflight.js.map