@chief-clancy/core 0.1.0

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 (635) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/dist/board/azdo/api/api.d.ts +95 -0
  4. package/dist/board/azdo/api/api.d.ts.map +1 -0
  5. package/dist/board/azdo/api/api.js +173 -0
  6. package/dist/board/azdo/api/api.js.map +1 -0
  7. package/dist/board/azdo/api/helpers.d.ts +89 -0
  8. package/dist/board/azdo/api/helpers.d.ts.map +1 -0
  9. package/dist/board/azdo/api/helpers.js +133 -0
  10. package/dist/board/azdo/api/helpers.js.map +1 -0
  11. package/dist/board/azdo/api/index.d.ts +5 -0
  12. package/dist/board/azdo/api/index.d.ts.map +1 -0
  13. package/dist/board/azdo/api/index.js +3 -0
  14. package/dist/board/azdo/api/index.js.map +1 -0
  15. package/dist/board/azdo/azdo-board.d.ts +12 -0
  16. package/dist/board/azdo/azdo-board.d.ts.map +1 -0
  17. package/dist/board/azdo/azdo-board.js +104 -0
  18. package/dist/board/azdo/azdo-board.js.map +1 -0
  19. package/dist/board/azdo/index.d.ts +3 -0
  20. package/dist/board/azdo/index.d.ts.map +1 -0
  21. package/dist/board/azdo/index.js +3 -0
  22. package/dist/board/azdo/index.js.map +1 -0
  23. package/dist/board/azdo/labels/index.d.ts +2 -0
  24. package/dist/board/azdo/labels/index.d.ts.map +1 -0
  25. package/dist/board/azdo/labels/index.js +2 -0
  26. package/dist/board/azdo/labels/index.js.map +1 -0
  27. package/dist/board/azdo/labels/labels.d.ts +27 -0
  28. package/dist/board/azdo/labels/labels.d.ts.map +1 -0
  29. package/dist/board/azdo/labels/labels.js +64 -0
  30. package/dist/board/azdo/labels/labels.js.map +1 -0
  31. package/dist/board/azdo/relations/index.d.ts +2 -0
  32. package/dist/board/azdo/relations/index.d.ts.map +1 -0
  33. package/dist/board/azdo/relations/index.js +2 -0
  34. package/dist/board/azdo/relations/index.js.map +1 -0
  35. package/dist/board/azdo/relations/relations.d.ts +37 -0
  36. package/dist/board/azdo/relations/relations.d.ts.map +1 -0
  37. package/dist/board/azdo/relations/relations.js +109 -0
  38. package/dist/board/azdo/relations/relations.js.map +1 -0
  39. package/dist/board/detect-board.d.ts +28 -0
  40. package/dist/board/detect-board.d.ts.map +1 -0
  41. package/dist/board/detect-board.js +80 -0
  42. package/dist/board/detect-board.js.map +1 -0
  43. package/dist/board/factory/factory.d.ts +18 -0
  44. package/dist/board/factory/factory.d.ts.map +1 -0
  45. package/dist/board/factory/factory.js +34 -0
  46. package/dist/board/factory/factory.js.map +1 -0
  47. package/dist/board/factory/index.d.ts +2 -0
  48. package/dist/board/factory/index.d.ts.map +1 -0
  49. package/dist/board/factory/index.js +2 -0
  50. package/dist/board/factory/index.js.map +1 -0
  51. package/dist/board/github/api/api.d.ts +86 -0
  52. package/dist/board/github/api/api.d.ts.map +1 -0
  53. package/dist/board/github/api/api.js +161 -0
  54. package/dist/board/github/api/api.js.map +1 -0
  55. package/dist/board/github/api/index.d.ts +3 -0
  56. package/dist/board/github/api/index.d.ts.map +1 -0
  57. package/dist/board/github/api/index.js +2 -0
  58. package/dist/board/github/api/index.js.map +1 -0
  59. package/dist/board/github/github-board.d.ts +19 -0
  60. package/dist/board/github/github-board.d.ts.map +1 -0
  61. package/dist/board/github/github-board.js +104 -0
  62. package/dist/board/github/github-board.js.map +1 -0
  63. package/dist/board/github/index.d.ts +3 -0
  64. package/dist/board/github/index.d.ts.map +1 -0
  65. package/dist/board/github/index.js +3 -0
  66. package/dist/board/github/index.js.map +1 -0
  67. package/dist/board/github/labels/index.d.ts +2 -0
  68. package/dist/board/github/labels/index.d.ts.map +1 -0
  69. package/dist/board/github/labels/index.js +2 -0
  70. package/dist/board/github/labels/index.js.map +1 -0
  71. package/dist/board/github/labels/labels.d.ts +42 -0
  72. package/dist/board/github/labels/labels.d.ts.map +1 -0
  73. package/dist/board/github/labels/labels.js +93 -0
  74. package/dist/board/github/labels/labels.js.map +1 -0
  75. package/dist/board/github/relations/index.d.ts +2 -0
  76. package/dist/board/github/relations/index.d.ts.map +1 -0
  77. package/dist/board/github/relations/index.js +2 -0
  78. package/dist/board/github/relations/index.js.map +1 -0
  79. package/dist/board/github/relations/relations.d.ts +54 -0
  80. package/dist/board/github/relations/relations.d.ts.map +1 -0
  81. package/dist/board/github/relations/relations.js +152 -0
  82. package/dist/board/github/relations/relations.js.map +1 -0
  83. package/dist/board/index.d.ts +2 -0
  84. package/dist/board/index.d.ts.map +1 -0
  85. package/dist/board/index.js +2 -0
  86. package/dist/board/index.js.map +1 -0
  87. package/dist/board/jira/api/api.d.ts +129 -0
  88. package/dist/board/jira/api/api.d.ts.map +1 -0
  89. package/dist/board/jira/api/api.js +207 -0
  90. package/dist/board/jira/api/api.js.map +1 -0
  91. package/dist/board/jira/api/index.d.ts +3 -0
  92. package/dist/board/jira/api/index.d.ts.map +1 -0
  93. package/dist/board/jira/api/index.js +2 -0
  94. package/dist/board/jira/api/index.js.map +1 -0
  95. package/dist/board/jira/index.d.ts +3 -0
  96. package/dist/board/jira/index.d.ts.map +1 -0
  97. package/dist/board/jira/index.js +3 -0
  98. package/dist/board/jira/index.js.map +1 -0
  99. package/dist/board/jira/jira-board.d.ts +12 -0
  100. package/dist/board/jira/jira-board.d.ts.map +1 -0
  101. package/dist/board/jira/jira-board.js +112 -0
  102. package/dist/board/jira/jira-board.js.map +1 -0
  103. package/dist/board/jira/labels/index.d.ts +2 -0
  104. package/dist/board/jira/labels/index.d.ts.map +1 -0
  105. package/dist/board/jira/labels/index.js +2 -0
  106. package/dist/board/jira/labels/index.js.map +1 -0
  107. package/dist/board/jira/labels/labels.d.ts +34 -0
  108. package/dist/board/jira/labels/labels.d.ts.map +1 -0
  109. package/dist/board/jira/labels/labels.js +69 -0
  110. package/dist/board/jira/labels/labels.js.map +1 -0
  111. package/dist/board/jira/relations/index.d.ts +2 -0
  112. package/dist/board/jira/relations/index.d.ts.map +1 -0
  113. package/dist/board/jira/relations/index.js +2 -0
  114. package/dist/board/jira/relations/index.js.map +1 -0
  115. package/dist/board/jira/relations/relations.d.ts +44 -0
  116. package/dist/board/jira/relations/relations.d.ts.map +1 -0
  117. package/dist/board/jira/relations/relations.js +111 -0
  118. package/dist/board/jira/relations/relations.js.map +1 -0
  119. package/dist/board/linear/api/api.d.ts +68 -0
  120. package/dist/board/linear/api/api.d.ts.map +1 -0
  121. package/dist/board/linear/api/api.js +179 -0
  122. package/dist/board/linear/api/api.js.map +1 -0
  123. package/dist/board/linear/api/index.d.ts +2 -0
  124. package/dist/board/linear/api/index.d.ts.map +1 -0
  125. package/dist/board/linear/api/index.js +2 -0
  126. package/dist/board/linear/api/index.js.map +1 -0
  127. package/dist/board/linear/index.d.ts +3 -0
  128. package/dist/board/linear/index.d.ts.map +1 -0
  129. package/dist/board/linear/index.js +3 -0
  130. package/dist/board/linear/index.js.map +1 -0
  131. package/dist/board/linear/labels/index.d.ts +2 -0
  132. package/dist/board/linear/labels/index.d.ts.map +1 -0
  133. package/dist/board/linear/labels/index.js +2 -0
  134. package/dist/board/linear/labels/index.js.map +1 -0
  135. package/dist/board/linear/labels/labels.d.ts +63 -0
  136. package/dist/board/linear/labels/labels.d.ts.map +1 -0
  137. package/dist/board/linear/labels/labels.js +204 -0
  138. package/dist/board/linear/labels/labels.js.map +1 -0
  139. package/dist/board/linear/linear-board.d.ts +18 -0
  140. package/dist/board/linear/linear-board.d.ts.map +1 -0
  141. package/dist/board/linear/linear-board.js +115 -0
  142. package/dist/board/linear/linear-board.js.map +1 -0
  143. package/dist/board/linear/relations/index.d.ts +2 -0
  144. package/dist/board/linear/relations/index.d.ts.map +1 -0
  145. package/dist/board/linear/relations/index.js +2 -0
  146. package/dist/board/linear/relations/index.js.map +1 -0
  147. package/dist/board/linear/relations/relations.d.ts +67 -0
  148. package/dist/board/linear/relations/relations.d.ts.map +1 -0
  149. package/dist/board/linear/relations/relations.js +195 -0
  150. package/dist/board/linear/relations/relations.js.map +1 -0
  151. package/dist/board/notion/api/api.d.ts +83 -0
  152. package/dist/board/notion/api/api.d.ts.map +1 -0
  153. package/dist/board/notion/api/api.js +124 -0
  154. package/dist/board/notion/api/api.js.map +1 -0
  155. package/dist/board/notion/api/helpers.d.ts +105 -0
  156. package/dist/board/notion/api/helpers.d.ts.map +1 -0
  157. package/dist/board/notion/api/helpers.js +175 -0
  158. package/dist/board/notion/api/helpers.js.map +1 -0
  159. package/dist/board/notion/api/index.d.ts +4 -0
  160. package/dist/board/notion/api/index.d.ts.map +1 -0
  161. package/dist/board/notion/api/index.js +3 -0
  162. package/dist/board/notion/api/index.js.map +1 -0
  163. package/dist/board/notion/index.d.ts +3 -0
  164. package/dist/board/notion/index.d.ts.map +1 -0
  165. package/dist/board/notion/index.js +3 -0
  166. package/dist/board/notion/index.js.map +1 -0
  167. package/dist/board/notion/labels/index.d.ts +2 -0
  168. package/dist/board/notion/labels/index.d.ts.map +1 -0
  169. package/dist/board/notion/labels/index.js +2 -0
  170. package/dist/board/notion/labels/index.js.map +1 -0
  171. package/dist/board/notion/labels/labels.d.ts +30 -0
  172. package/dist/board/notion/labels/labels.d.ts.map +1 -0
  173. package/dist/board/notion/labels/labels.js +56 -0
  174. package/dist/board/notion/labels/labels.js.map +1 -0
  175. package/dist/board/notion/notion-board.d.ts +12 -0
  176. package/dist/board/notion/notion-board.d.ts.map +1 -0
  177. package/dist/board/notion/notion-board.js +156 -0
  178. package/dist/board/notion/notion-board.js.map +1 -0
  179. package/dist/board/notion/relations/index.d.ts +2 -0
  180. package/dist/board/notion/relations/index.d.ts.map +1 -0
  181. package/dist/board/notion/relations/index.js +2 -0
  182. package/dist/board/notion/relations/index.js.map +1 -0
  183. package/dist/board/notion/relations/relations.d.ts +43 -0
  184. package/dist/board/notion/relations/relations.d.ts.map +1 -0
  185. package/dist/board/notion/relations/relations.js +127 -0
  186. package/dist/board/notion/relations/relations.js.map +1 -0
  187. package/dist/board/shortcut/api/api.d.ts +110 -0
  188. package/dist/board/shortcut/api/api.d.ts.map +1 -0
  189. package/dist/board/shortcut/api/api.js +227 -0
  190. package/dist/board/shortcut/api/api.js.map +1 -0
  191. package/dist/board/shortcut/api/index.d.ts +2 -0
  192. package/dist/board/shortcut/api/index.d.ts.map +1 -0
  193. package/dist/board/shortcut/api/index.js +2 -0
  194. package/dist/board/shortcut/api/index.js.map +1 -0
  195. package/dist/board/shortcut/index.d.ts +3 -0
  196. package/dist/board/shortcut/index.d.ts.map +1 -0
  197. package/dist/board/shortcut/index.js +3 -0
  198. package/dist/board/shortcut/index.js.map +1 -0
  199. package/dist/board/shortcut/labels/index.d.ts +2 -0
  200. package/dist/board/shortcut/labels/index.d.ts.map +1 -0
  201. package/dist/board/shortcut/labels/index.js +2 -0
  202. package/dist/board/shortcut/labels/index.js.map +1 -0
  203. package/dist/board/shortcut/labels/labels.d.ts +95 -0
  204. package/dist/board/shortcut/labels/labels.d.ts.map +1 -0
  205. package/dist/board/shortcut/labels/labels.js +154 -0
  206. package/dist/board/shortcut/labels/labels.js.map +1 -0
  207. package/dist/board/shortcut/relations/index.d.ts +2 -0
  208. package/dist/board/shortcut/relations/index.d.ts.map +1 -0
  209. package/dist/board/shortcut/relations/index.js +2 -0
  210. package/dist/board/shortcut/relations/index.js.map +1 -0
  211. package/dist/board/shortcut/relations/relations.d.ts +44 -0
  212. package/dist/board/shortcut/relations/relations.d.ts.map +1 -0
  213. package/dist/board/shortcut/relations/relations.js +118 -0
  214. package/dist/board/shortcut/relations/relations.js.map +1 -0
  215. package/dist/board/shortcut/shortcut-board.d.ts +18 -0
  216. package/dist/board/shortcut/shortcut-board.d.ts.map +1 -0
  217. package/dist/board/shortcut/shortcut-board.js +143 -0
  218. package/dist/board/shortcut/shortcut-board.js.map +1 -0
  219. package/dist/dev/lifecycle/branch/branch.d.ts +35 -0
  220. package/dist/dev/lifecycle/branch/branch.d.ts.map +1 -0
  221. package/dist/dev/lifecycle/branch/branch.js +48 -0
  222. package/dist/dev/lifecycle/branch/branch.js.map +1 -0
  223. package/dist/dev/lifecycle/branch/index.d.ts +2 -0
  224. package/dist/dev/lifecycle/branch/index.d.ts.map +1 -0
  225. package/dist/dev/lifecycle/branch/index.js +2 -0
  226. package/dist/dev/lifecycle/branch/index.js.map +1 -0
  227. package/dist/dev/lifecycle/commit-type/commit-type.d.ts +22 -0
  228. package/dist/dev/lifecycle/commit-type/commit-type.d.ts.map +1 -0
  229. package/dist/dev/lifecycle/commit-type/commit-type.js +50 -0
  230. package/dist/dev/lifecycle/commit-type/commit-type.js.map +1 -0
  231. package/dist/dev/lifecycle/commit-type/index.d.ts +2 -0
  232. package/dist/dev/lifecycle/commit-type/index.d.ts.map +1 -0
  233. package/dist/dev/lifecycle/commit-type/index.js +2 -0
  234. package/dist/dev/lifecycle/commit-type/index.js.map +1 -0
  235. package/dist/dev/lifecycle/cost/cost.d.ts +28 -0
  236. package/dist/dev/lifecycle/cost/cost.d.ts.map +1 -0
  237. package/dist/dev/lifecycle/cost/cost.js +36 -0
  238. package/dist/dev/lifecycle/cost/cost.js.map +1 -0
  239. package/dist/dev/lifecycle/deliver-epic/deliver-epic.d.ts +44 -0
  240. package/dist/dev/lifecycle/deliver-epic/deliver-epic.d.ts.map +1 -0
  241. package/dist/dev/lifecycle/deliver-epic/deliver-epic.js +75 -0
  242. package/dist/dev/lifecycle/deliver-epic/deliver-epic.js.map +1 -0
  243. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.d.ts +51 -0
  244. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.d.ts.map +1 -0
  245. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.js +132 -0
  246. package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.js.map +1 -0
  247. package/dist/dev/lifecycle/epic/epic.d.ts +66 -0
  248. package/dist/dev/lifecycle/epic/epic.d.ts.map +1 -0
  249. package/dist/dev/lifecycle/epic/epic.js +91 -0
  250. package/dist/dev/lifecycle/epic/epic.js.map +1 -0
  251. package/dist/dev/lifecycle/epic/index.d.ts +2 -0
  252. package/dist/dev/lifecycle/epic/index.d.ts.map +1 -0
  253. package/dist/dev/lifecycle/epic/index.js +2 -0
  254. package/dist/dev/lifecycle/epic/index.js.map +1 -0
  255. package/dist/dev/lifecycle/feasibility/feasibility.d.ts +55 -0
  256. package/dist/dev/lifecycle/feasibility/feasibility.d.ts.map +1 -0
  257. package/dist/dev/lifecycle/feasibility/feasibility.js +75 -0
  258. package/dist/dev/lifecycle/feasibility/feasibility.js.map +1 -0
  259. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.d.ts +49 -0
  260. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.d.ts.map +1 -0
  261. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.js +81 -0
  262. package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.js.map +1 -0
  263. package/dist/dev/lifecycle/format/format.d.ts +11 -0
  264. package/dist/dev/lifecycle/format/format.d.ts.map +1 -0
  265. package/dist/dev/lifecycle/format/format.js +23 -0
  266. package/dist/dev/lifecycle/format/format.js.map +1 -0
  267. package/dist/dev/lifecycle/lock/index.d.ts +3 -0
  268. package/dist/dev/lifecycle/lock/index.d.ts.map +1 -0
  269. package/dist/dev/lifecycle/lock/index.js +2 -0
  270. package/dist/dev/lifecycle/lock/index.js.map +1 -0
  271. package/dist/dev/lifecycle/lock/lock.d.ts +68 -0
  272. package/dist/dev/lifecycle/lock/lock.d.ts.map +1 -0
  273. package/dist/dev/lifecycle/lock/lock.js +125 -0
  274. package/dist/dev/lifecycle/lock/lock.js.map +1 -0
  275. package/dist/dev/lifecycle/outcome/index.d.ts +2 -0
  276. package/dist/dev/lifecycle/outcome/index.d.ts.map +1 -0
  277. package/dist/dev/lifecycle/outcome/index.js +2 -0
  278. package/dist/dev/lifecycle/outcome/index.js.map +1 -0
  279. package/dist/dev/lifecycle/outcome/outcome.d.ts +65 -0
  280. package/dist/dev/lifecycle/outcome/outcome.d.ts.map +1 -0
  281. package/dist/dev/lifecycle/outcome/outcome.js +61 -0
  282. package/dist/dev/lifecycle/outcome/outcome.js.map +1 -0
  283. package/dist/dev/lifecycle/pr-creation/index.d.ts +3 -0
  284. package/dist/dev/lifecycle/pr-creation/index.d.ts.map +1 -0
  285. package/dist/dev/lifecycle/pr-creation/index.js +2 -0
  286. package/dist/dev/lifecycle/pr-creation/index.js.map +1 -0
  287. package/dist/dev/lifecycle/pr-creation/pr-creation.d.ts +47 -0
  288. package/dist/dev/lifecycle/pr-creation/pr-creation.d.ts.map +1 -0
  289. package/dist/dev/lifecycle/pr-creation/pr-creation.js +143 -0
  290. package/dist/dev/lifecycle/pr-creation/pr-creation.js.map +1 -0
  291. package/dist/dev/lifecycle/preflight/preflight.d.ts +42 -0
  292. package/dist/dev/lifecycle/preflight/preflight.d.ts.map +1 -0
  293. package/dist/dev/lifecycle/preflight/preflight.js +101 -0
  294. package/dist/dev/lifecycle/preflight/preflight.js.map +1 -0
  295. package/dist/dev/lifecycle/progress/index.d.ts +3 -0
  296. package/dist/dev/lifecycle/progress/index.d.ts.map +1 -0
  297. package/dist/dev/lifecycle/progress/index.js +2 -0
  298. package/dist/dev/lifecycle/progress/index.js.map +1 -0
  299. package/dist/dev/lifecycle/progress/progress.d.ts +98 -0
  300. package/dist/dev/lifecycle/progress/progress.d.ts.map +1 -0
  301. package/dist/dev/lifecycle/progress/progress.js +212 -0
  302. package/dist/dev/lifecycle/progress/progress.js.map +1 -0
  303. package/dist/dev/lifecycle/pull-request/azdo/azdo.d.ts +86 -0
  304. package/dist/dev/lifecycle/pull-request/azdo/azdo.d.ts.map +1 -0
  305. package/dist/dev/lifecycle/pull-request/azdo/azdo.js +198 -0
  306. package/dist/dev/lifecycle/pull-request/azdo/azdo.js.map +1 -0
  307. package/dist/dev/lifecycle/pull-request/azdo/index.d.ts +2 -0
  308. package/dist/dev/lifecycle/pull-request/azdo/index.d.ts.map +1 -0
  309. package/dist/dev/lifecycle/pull-request/azdo/index.js +2 -0
  310. package/dist/dev/lifecycle/pull-request/azdo/index.js.map +1 -0
  311. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.d.ts +85 -0
  312. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.d.ts.map +1 -0
  313. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.js +158 -0
  314. package/dist/dev/lifecycle/pull-request/bitbucket/cloud.js.map +1 -0
  315. package/dist/dev/lifecycle/pull-request/bitbucket/index.d.ts +3 -0
  316. package/dist/dev/lifecycle/pull-request/bitbucket/index.d.ts.map +1 -0
  317. package/dist/dev/lifecycle/pull-request/bitbucket/index.js +3 -0
  318. package/dist/dev/lifecycle/pull-request/bitbucket/index.js.map +1 -0
  319. package/dist/dev/lifecycle/pull-request/bitbucket/server.d.ts +85 -0
  320. package/dist/dev/lifecycle/pull-request/bitbucket/server.d.ts.map +1 -0
  321. package/dist/dev/lifecycle/pull-request/bitbucket/server.js +168 -0
  322. package/dist/dev/lifecycle/pull-request/bitbucket/server.js.map +1 -0
  323. package/dist/dev/lifecycle/pull-request/github/github.d.ts +107 -0
  324. package/dist/dev/lifecycle/pull-request/github/github.d.ts.map +1 -0
  325. package/dist/dev/lifecycle/pull-request/github/github.js +225 -0
  326. package/dist/dev/lifecycle/pull-request/github/github.js.map +1 -0
  327. package/dist/dev/lifecycle/pull-request/github/index.d.ts +2 -0
  328. package/dist/dev/lifecycle/pull-request/github/index.d.ts.map +1 -0
  329. package/dist/dev/lifecycle/pull-request/github/index.js +2 -0
  330. package/dist/dev/lifecycle/pull-request/github/index.js.map +1 -0
  331. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.d.ts +103 -0
  332. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.d.ts.map +1 -0
  333. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.js +215 -0
  334. package/dist/dev/lifecycle/pull-request/gitlab/gitlab.js.map +1 -0
  335. package/dist/dev/lifecycle/pull-request/gitlab/index.d.ts +2 -0
  336. package/dist/dev/lifecycle/pull-request/gitlab/index.d.ts.map +1 -0
  337. package/dist/dev/lifecycle/pull-request/gitlab/index.js +2 -0
  338. package/dist/dev/lifecycle/pull-request/gitlab/index.js.map +1 -0
  339. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.d.ts +44 -0
  340. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.d.ts.map +1 -0
  341. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.js +64 -0
  342. package/dist/dev/lifecycle/pull-request/post-pr/post-pr.js.map +1 -0
  343. package/dist/dev/lifecycle/pull-request/pr-body/index.d.ts +3 -0
  344. package/dist/dev/lifecycle/pull-request/pr-body/index.d.ts.map +1 -0
  345. package/dist/dev/lifecycle/pull-request/pr-body/index.js +2 -0
  346. package/dist/dev/lifecycle/pull-request/pr-body/index.js.map +1 -0
  347. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.d.ts +65 -0
  348. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.d.ts.map +1 -0
  349. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.js +144 -0
  350. package/dist/dev/lifecycle/pull-request/pr-body/pr-body.js.map +1 -0
  351. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.d.ts +30 -0
  352. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.d.ts.map +1 -0
  353. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.js +39 -0
  354. package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.js.map +1 -0
  355. package/dist/dev/lifecycle/quality/quality.d.ts +99 -0
  356. package/dist/dev/lifecycle/quality/quality.d.ts.map +1 -0
  357. package/dist/dev/lifecycle/quality/quality.js +213 -0
  358. package/dist/dev/lifecycle/quality/quality.js.map +1 -0
  359. package/dist/dev/lifecycle/resume/resume.d.ts +64 -0
  360. package/dist/dev/lifecycle/resume/resume.d.ts.map +1 -0
  361. package/dist/dev/lifecycle/resume/resume.js +171 -0
  362. package/dist/dev/lifecycle/resume/resume.js.map +1 -0
  363. package/dist/dev/lifecycle/rework/rework-builders.d.ts +20 -0
  364. package/dist/dev/lifecycle/rework/rework-builders.d.ts.map +1 -0
  365. package/dist/dev/lifecycle/rework/rework-builders.js +203 -0
  366. package/dist/dev/lifecycle/rework/rework-builders.js.map +1 -0
  367. package/dist/dev/lifecycle/rework/rework-handlers.d.ts +50 -0
  368. package/dist/dev/lifecycle/rework/rework-handlers.d.ts.map +1 -0
  369. package/dist/dev/lifecycle/rework/rework-handlers.js +41 -0
  370. package/dist/dev/lifecycle/rework/rework-handlers.js.map +1 -0
  371. package/dist/dev/lifecycle/rework/rework.d.ts +63 -0
  372. package/dist/dev/lifecycle/rework/rework.d.ts.map +1 -0
  373. package/dist/dev/lifecycle/rework/rework.js +141 -0
  374. package/dist/dev/lifecycle/rework/rework.js.map +1 -0
  375. package/dist/dev/pipeline/context.d.ts +105 -0
  376. package/dist/dev/pipeline/context.d.ts.map +1 -0
  377. package/dist/dev/pipeline/context.js +107 -0
  378. package/dist/dev/pipeline/context.js.map +1 -0
  379. package/dist/dev/pipeline/index.d.ts +6 -0
  380. package/dist/dev/pipeline/index.d.ts.map +1 -0
  381. package/dist/dev/pipeline/index.js +5 -0
  382. package/dist/dev/pipeline/index.js.map +1 -0
  383. package/dist/dev/pipeline/phases/branch-setup/branch-setup.d.ts +62 -0
  384. package/dist/dev/pipeline/phases/branch-setup/branch-setup.d.ts.map +1 -0
  385. package/dist/dev/pipeline/phases/branch-setup/branch-setup.js +128 -0
  386. package/dist/dev/pipeline/phases/branch-setup/branch-setup.js.map +1 -0
  387. package/dist/dev/pipeline/phases/branch-setup/index.d.ts +3 -0
  388. package/dist/dev/pipeline/phases/branch-setup/index.d.ts.map +1 -0
  389. package/dist/dev/pipeline/phases/branch-setup/index.js +2 -0
  390. package/dist/dev/pipeline/phases/branch-setup/index.js.map +1 -0
  391. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.d.ts +32 -0
  392. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.d.ts.map +1 -0
  393. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.js +32 -0
  394. package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.js.map +1 -0
  395. package/dist/dev/pipeline/phases/cleanup-phase/index.d.ts +3 -0
  396. package/dist/dev/pipeline/phases/cleanup-phase/index.d.ts.map +1 -0
  397. package/dist/dev/pipeline/phases/cleanup-phase/index.js +2 -0
  398. package/dist/dev/pipeline/phases/cleanup-phase/index.js.map +1 -0
  399. package/dist/dev/pipeline/phases/cost-phase/cost-phase.d.ts +40 -0
  400. package/dist/dev/pipeline/phases/cost-phase/cost-phase.d.ts.map +1 -0
  401. package/dist/dev/pipeline/phases/cost-phase/cost-phase.js +43 -0
  402. package/dist/dev/pipeline/phases/cost-phase/cost-phase.js.map +1 -0
  403. package/dist/dev/pipeline/phases/cost-phase/index.d.ts +3 -0
  404. package/dist/dev/pipeline/phases/cost-phase/index.d.ts.map +1 -0
  405. package/dist/dev/pipeline/phases/cost-phase/index.js +2 -0
  406. package/dist/dev/pipeline/phases/cost-phase/index.js.map +1 -0
  407. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.d.ts +68 -0
  408. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.d.ts.map +1 -0
  409. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.js +125 -0
  410. package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.js.map +1 -0
  411. package/dist/dev/pipeline/phases/deliver-phase/index.d.ts +3 -0
  412. package/dist/dev/pipeline/phases/deliver-phase/index.d.ts.map +1 -0
  413. package/dist/dev/pipeline/phases/deliver-phase/index.js +2 -0
  414. package/dist/dev/pipeline/phases/deliver-phase/index.js.map +1 -0
  415. package/dist/dev/pipeline/phases/dry-run/dry-run.d.ts +38 -0
  416. package/dist/dev/pipeline/phases/dry-run/dry-run.d.ts.map +1 -0
  417. package/dist/dev/pipeline/phases/dry-run/dry-run.js +33 -0
  418. package/dist/dev/pipeline/phases/dry-run/dry-run.js.map +1 -0
  419. package/dist/dev/pipeline/phases/dry-run/index.d.ts +2 -0
  420. package/dist/dev/pipeline/phases/dry-run/index.d.ts.map +1 -0
  421. package/dist/dev/pipeline/phases/dry-run/index.js +2 -0
  422. package/dist/dev/pipeline/phases/dry-run/index.js.map +1 -0
  423. package/dist/dev/pipeline/phases/epic-completion/epic-completion.d.ts +48 -0
  424. package/dist/dev/pipeline/phases/epic-completion/epic-completion.d.ts.map +1 -0
  425. package/dist/dev/pipeline/phases/epic-completion/epic-completion.js +42 -0
  426. package/dist/dev/pipeline/phases/epic-completion/epic-completion.js.map +1 -0
  427. package/dist/dev/pipeline/phases/epic-completion/index.d.ts +3 -0
  428. package/dist/dev/pipeline/phases/epic-completion/index.d.ts.map +1 -0
  429. package/dist/dev/pipeline/phases/epic-completion/index.js +2 -0
  430. package/dist/dev/pipeline/phases/epic-completion/index.js.map +1 -0
  431. package/dist/dev/pipeline/phases/feasibility/feasibility.d.ts +52 -0
  432. package/dist/dev/pipeline/phases/feasibility/feasibility.d.ts.map +1 -0
  433. package/dist/dev/pipeline/phases/feasibility/feasibility.js +34 -0
  434. package/dist/dev/pipeline/phases/feasibility/feasibility.js.map +1 -0
  435. package/dist/dev/pipeline/phases/feasibility/index.d.ts +3 -0
  436. package/dist/dev/pipeline/phases/feasibility/index.d.ts.map +1 -0
  437. package/dist/dev/pipeline/phases/feasibility/index.js +2 -0
  438. package/dist/dev/pipeline/phases/feasibility/index.js.map +1 -0
  439. package/dist/dev/pipeline/phases/index.d.ts +26 -0
  440. package/dist/dev/pipeline/phases/index.d.ts.map +1 -0
  441. package/dist/dev/pipeline/phases/index.js +14 -0
  442. package/dist/dev/pipeline/phases/index.js.map +1 -0
  443. package/dist/dev/pipeline/phases/lock-check/index.d.ts +3 -0
  444. package/dist/dev/pipeline/phases/lock-check/index.d.ts.map +1 -0
  445. package/dist/dev/pipeline/phases/lock-check/index.js +2 -0
  446. package/dist/dev/pipeline/phases/lock-check/index.js.map +1 -0
  447. package/dist/dev/pipeline/phases/lock-check/lock-check.d.ts +55 -0
  448. package/dist/dev/pipeline/phases/lock-check/lock-check.d.ts.map +1 -0
  449. package/dist/dev/pipeline/phases/lock-check/lock-check.js +60 -0
  450. package/dist/dev/pipeline/phases/lock-check/lock-check.js.map +1 -0
  451. package/dist/dev/pipeline/phases/pr-retry/index.d.ts +3 -0
  452. package/dist/dev/pipeline/phases/pr-retry/index.d.ts.map +1 -0
  453. package/dist/dev/pipeline/phases/pr-retry/index.js +2 -0
  454. package/dist/dev/pipeline/phases/pr-retry/index.js.map +1 -0
  455. package/dist/dev/pipeline/phases/pr-retry/pr-retry.d.ts +58 -0
  456. package/dist/dev/pipeline/phases/pr-retry/pr-retry.d.ts.map +1 -0
  457. package/dist/dev/pipeline/phases/pr-retry/pr-retry.js +82 -0
  458. package/dist/dev/pipeline/phases/pr-retry/pr-retry.js.map +1 -0
  459. package/dist/dev/pipeline/phases/preflight-phase/index.d.ts +3 -0
  460. package/dist/dev/pipeline/phases/preflight-phase/index.d.ts.map +1 -0
  461. package/dist/dev/pipeline/phases/preflight-phase/index.js +2 -0
  462. package/dist/dev/pipeline/phases/preflight-phase/index.js.map +1 -0
  463. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.d.ts +42 -0
  464. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.d.ts.map +1 -0
  465. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.js +41 -0
  466. package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.js.map +1 -0
  467. package/dist/dev/pipeline/phases/rework-detection/index.d.ts +3 -0
  468. package/dist/dev/pipeline/phases/rework-detection/index.d.ts.map +1 -0
  469. package/dist/dev/pipeline/phases/rework-detection/index.js +2 -0
  470. package/dist/dev/pipeline/phases/rework-detection/index.js.map +1 -0
  471. package/dist/dev/pipeline/phases/rework-detection/rework-detection.d.ts +40 -0
  472. package/dist/dev/pipeline/phases/rework-detection/rework-detection.d.ts.map +1 -0
  473. package/dist/dev/pipeline/phases/rework-detection/rework-detection.js +38 -0
  474. package/dist/dev/pipeline/phases/rework-detection/rework-detection.js.map +1 -0
  475. package/dist/dev/pipeline/phases/ticket-fetch/index.d.ts +3 -0
  476. package/dist/dev/pipeline/phases/ticket-fetch/index.d.ts.map +1 -0
  477. package/dist/dev/pipeline/phases/ticket-fetch/index.js +2 -0
  478. package/dist/dev/pipeline/phases/ticket-fetch/index.js.map +1 -0
  479. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.d.ts +46 -0
  480. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.d.ts.map +1 -0
  481. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.js +64 -0
  482. package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.js.map +1 -0
  483. package/dist/dev/pipeline/phases/transition/index.d.ts +3 -0
  484. package/dist/dev/pipeline/phases/transition/index.d.ts.map +1 -0
  485. package/dist/dev/pipeline/phases/transition/index.js +2 -0
  486. package/dist/dev/pipeline/phases/transition/index.js.map +1 -0
  487. package/dist/dev/pipeline/phases/transition/transition.d.ts +30 -0
  488. package/dist/dev/pipeline/phases/transition/transition.d.ts.map +1 -0
  489. package/dist/dev/pipeline/phases/transition/transition.js +27 -0
  490. package/dist/dev/pipeline/phases/transition/transition.js.map +1 -0
  491. package/dist/dev/pipeline/run-pipeline.d.ts +98 -0
  492. package/dist/dev/pipeline/run-pipeline.d.ts.map +1 -0
  493. package/dist/dev/pipeline/run-pipeline.js +106 -0
  494. package/dist/dev/pipeline/run-pipeline.js.map +1 -0
  495. package/dist/index.d.ts +58 -0
  496. package/dist/index.d.ts.map +1 -0
  497. package/dist/index.js +58 -0
  498. package/dist/index.js.map +1 -0
  499. package/dist/schemas/azdo/azdo-pr.d.ts +58 -0
  500. package/dist/schemas/azdo/azdo-pr.d.ts.map +1 -0
  501. package/dist/schemas/azdo/azdo-pr.js +48 -0
  502. package/dist/schemas/azdo/azdo-pr.js.map +1 -0
  503. package/dist/schemas/azdo/azdo.d.ts +88 -0
  504. package/dist/schemas/azdo/azdo.d.ts.map +1 -0
  505. package/dist/schemas/azdo/azdo.js +60 -0
  506. package/dist/schemas/azdo/azdo.js.map +1 -0
  507. package/dist/schemas/bitbucket/bitbucket.d.ts +112 -0
  508. package/dist/schemas/bitbucket/bitbucket.d.ts.map +1 -0
  509. package/dist/schemas/bitbucket/bitbucket.js +73 -0
  510. package/dist/schemas/bitbucket/bitbucket.js.map +1 -0
  511. package/dist/schemas/env/env.d.ts +336 -0
  512. package/dist/schemas/env/env.d.ts.map +1 -0
  513. package/dist/schemas/env/env.js +94 -0
  514. package/dist/schemas/env/env.js.map +1 -0
  515. package/dist/schemas/github/github.d.ts +128 -0
  516. package/dist/schemas/github/github.d.ts.map +1 -0
  517. package/dist/schemas/github/github.js +65 -0
  518. package/dist/schemas/github/github.js.map +1 -0
  519. package/dist/schemas/gitlab/gitlab.d.ts +72 -0
  520. package/dist/schemas/gitlab/gitlab.d.ts.map +1 -0
  521. package/dist/schemas/gitlab/gitlab.js +38 -0
  522. package/dist/schemas/gitlab/gitlab.js.map +1 -0
  523. package/dist/schemas/index.d.ts +15 -0
  524. package/dist/schemas/index.d.ts.map +1 -0
  525. package/dist/schemas/index.js +8 -0
  526. package/dist/schemas/index.js.map +1 -0
  527. package/dist/schemas/jira/jira.d.ts +79 -0
  528. package/dist/schemas/jira/jira.d.ts.map +1 -0
  529. package/dist/schemas/jira/jira.js +69 -0
  530. package/dist/schemas/jira/jira.js.map +1 -0
  531. package/dist/schemas/linear/linear.d.ts +178 -0
  532. package/dist/schemas/linear/linear.d.ts.map +1 -0
  533. package/dist/schemas/linear/linear.js +136 -0
  534. package/dist/schemas/linear/linear.js.map +1 -0
  535. package/dist/schemas/notion/notion.d.ts +131 -0
  536. package/dist/schemas/notion/notion.d.ts.map +1 -0
  537. package/dist/schemas/notion/notion.js +102 -0
  538. package/dist/schemas/notion/notion.js.map +1 -0
  539. package/dist/schemas/shortcut/shortcut.d.ts +149 -0
  540. package/dist/schemas/shortcut/shortcut.d.ts.map +1 -0
  541. package/dist/schemas/shortcut/shortcut.js +68 -0
  542. package/dist/schemas/shortcut/shortcut.js.map +1 -0
  543. package/dist/shared/cache/cache.d.ts +14 -0
  544. package/dist/shared/cache/cache.d.ts.map +1 -0
  545. package/dist/shared/cache/cache.js +25 -0
  546. package/dist/shared/cache/cache.js.map +1 -0
  547. package/dist/shared/cache/index.d.ts +2 -0
  548. package/dist/shared/cache/index.d.ts.map +1 -0
  549. package/dist/shared/cache/index.js +2 -0
  550. package/dist/shared/cache/index.js.map +1 -0
  551. package/dist/shared/env-parser/env-parser.d.ts +42 -0
  552. package/dist/shared/env-parser/env-parser.d.ts.map +1 -0
  553. package/dist/shared/env-parser/env-parser.js +97 -0
  554. package/dist/shared/env-parser/env-parser.js.map +1 -0
  555. package/dist/shared/env-parser/index.d.ts +3 -0
  556. package/dist/shared/env-parser/index.d.ts.map +1 -0
  557. package/dist/shared/env-parser/index.js +2 -0
  558. package/dist/shared/env-parser/index.js.map +1 -0
  559. package/dist/shared/git-ops/git-ops.d.ts +127 -0
  560. package/dist/shared/git-ops/git-ops.d.ts.map +1 -0
  561. package/dist/shared/git-ops/git-ops.js +225 -0
  562. package/dist/shared/git-ops/git-ops.js.map +1 -0
  563. package/dist/shared/git-ops/index.d.ts +3 -0
  564. package/dist/shared/git-ops/index.d.ts.map +1 -0
  565. package/dist/shared/git-ops/index.js +2 -0
  566. package/dist/shared/git-ops/index.js.map +1 -0
  567. package/dist/shared/git-token/git-token.d.ts +18 -0
  568. package/dist/shared/git-token/git-token.d.ts.map +1 -0
  569. package/dist/shared/git-token/git-token.js +28 -0
  570. package/dist/shared/git-token/git-token.js.map +1 -0
  571. package/dist/shared/git-token/index.d.ts +2 -0
  572. package/dist/shared/git-token/index.d.ts.map +1 -0
  573. package/dist/shared/git-token/index.js +2 -0
  574. package/dist/shared/git-token/index.js.map +1 -0
  575. package/dist/shared/http/fetch-and-parse/fetch-and-parse.d.ts +32 -0
  576. package/dist/shared/http/fetch-and-parse/fetch-and-parse.d.ts.map +1 -0
  577. package/dist/shared/http/fetch-and-parse/fetch-and-parse.js +53 -0
  578. package/dist/shared/http/fetch-and-parse/fetch-and-parse.js.map +1 -0
  579. package/dist/shared/http/fetch-and-parse/index.d.ts +3 -0
  580. package/dist/shared/http/fetch-and-parse/index.d.ts.map +1 -0
  581. package/dist/shared/http/fetch-and-parse/index.js +2 -0
  582. package/dist/shared/http/fetch-and-parse/index.js.map +1 -0
  583. package/dist/shared/http/index.d.ts +7 -0
  584. package/dist/shared/http/index.d.ts.map +1 -0
  585. package/dist/shared/http/index.js +4 -0
  586. package/dist/shared/http/index.js.map +1 -0
  587. package/dist/shared/http/ping-endpoint/index.d.ts +3 -0
  588. package/dist/shared/http/ping-endpoint/index.d.ts.map +1 -0
  589. package/dist/shared/http/ping-endpoint/index.js +2 -0
  590. package/dist/shared/http/ping-endpoint/index.js.map +1 -0
  591. package/dist/shared/http/ping-endpoint/ping-endpoint.d.ts +29 -0
  592. package/dist/shared/http/ping-endpoint/ping-endpoint.d.ts.map +1 -0
  593. package/dist/shared/http/ping-endpoint/ping-endpoint.js +31 -0
  594. package/dist/shared/http/ping-endpoint/ping-endpoint.js.map +1 -0
  595. package/dist/shared/http/retry-fetch/index.d.ts +3 -0
  596. package/dist/shared/http/retry-fetch/index.d.ts.map +1 -0
  597. package/dist/shared/http/retry-fetch/index.js +2 -0
  598. package/dist/shared/http/retry-fetch/index.js.map +1 -0
  599. package/dist/shared/http/retry-fetch/retry-fetch.d.ts +33 -0
  600. package/dist/shared/http/retry-fetch/retry-fetch.d.ts.map +1 -0
  601. package/dist/shared/http/retry-fetch/retry-fetch.js +94 -0
  602. package/dist/shared/http/retry-fetch/retry-fetch.js.map +1 -0
  603. package/dist/shared/label-helpers/index.d.ts +3 -0
  604. package/dist/shared/label-helpers/index.d.ts.map +1 -0
  605. package/dist/shared/label-helpers/index.js +2 -0
  606. package/dist/shared/label-helpers/index.js.map +1 -0
  607. package/dist/shared/label-helpers/label-helpers.d.ts +41 -0
  608. package/dist/shared/label-helpers/label-helpers.d.ts.map +1 -0
  609. package/dist/shared/label-helpers/label-helpers.js +51 -0
  610. package/dist/shared/label-helpers/label-helpers.js.map +1 -0
  611. package/dist/shared/remote/index.d.ts +2 -0
  612. package/dist/shared/remote/index.d.ts.map +1 -0
  613. package/dist/shared/remote/index.js +2 -0
  614. package/dist/shared/remote/index.js.map +1 -0
  615. package/dist/shared/remote/remote.d.ts +39 -0
  616. package/dist/shared/remote/remote.d.ts.map +1 -0
  617. package/dist/shared/remote/remote.js +180 -0
  618. package/dist/shared/remote/remote.js.map +1 -0
  619. package/dist/types/board.d.ts +62 -0
  620. package/dist/types/board.d.ts.map +1 -0
  621. package/dist/types/board.js +5 -0
  622. package/dist/types/board.js.map +1 -0
  623. package/dist/types/index.d.ts +5 -0
  624. package/dist/types/index.d.ts.map +1 -0
  625. package/dist/types/index.js +2 -0
  626. package/dist/types/index.js.map +1 -0
  627. package/dist/types/progress.d.ts +21 -0
  628. package/dist/types/progress.d.ts.map +1 -0
  629. package/dist/types/progress.js +34 -0
  630. package/dist/types/progress.js.map +1 -0
  631. package/dist/types/remote.d.ts +77 -0
  632. package/dist/types/remote.d.ts.map +1 -0
  633. package/dist/types/remote.js +5 -0
  634. package/dist/types/remote.js.map +1 -0
  635. package/package.json +44 -0
@@ -0,0 +1,25 @@
1
+ /** Single-value process-lifetime cache. */
2
+ export class Cached {
3
+ // eslint-disable-next-line functional/prefer-readonly-type -- intentionally mutable cache
4
+ #value;
5
+ get() {
6
+ return this.#value;
7
+ }
8
+ store(value) {
9
+ this.#value = value;
10
+ }
11
+ }
12
+ /** Key-value process-lifetime cache. */
13
+ export class CachedMap {
14
+ #entries = new Map();
15
+ get(key) {
16
+ return this.#entries.get(key);
17
+ }
18
+ has(key) {
19
+ return this.#entries.has(key);
20
+ }
21
+ store(key, value) {
22
+ this.#entries.set(key, value);
23
+ }
24
+ }
25
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/shared/cache/cache.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,OAAO,MAAM;IACjB,0FAA0F;IAC1F,MAAM,CAAgB;IAEtB,GAAG;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,KAAQ;QACZ,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;CACF;AAED,wCAAwC;AACxC,MAAM,OAAO,SAAS;IACX,QAAQ,GAAG,IAAI,GAAG,EAAQ,CAAC;IAEpC,GAAG,CAAC,GAAM;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,GAAG,CAAC,GAAM;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,GAAM,EAAE,KAAQ;QACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { Cached, CachedMap } from './cache.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Cached, CachedMap } from './cache.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Parse a .env file content string into a key-value record.
3
+ *
4
+ * Handles single-quoted, double-quoted, and unquoted values.
5
+ * Ignores blank lines and lines starting with `#`. Does not process
6
+ * escape sequences (e.g. `\"` within quoted values). Duplicate keys
7
+ * resolve to the last value.
8
+ *
9
+ * @param content - The raw .env file content.
10
+ * @returns A record of environment variable key-value pairs.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * parseEnvContent('JIRA_BASE_URL=https://example.atlassian.net\nJIRA_USER=user@example.com');
15
+ * // { JIRA_BASE_URL: 'https://example.atlassian.net', JIRA_USER: 'user@example.com' }
16
+ * ```
17
+ */
18
+ export declare const parseEnvContent: (content: string) => Record<string, string>;
19
+ /** File system operations required by {@link loadClancyEnv}. */
20
+ export type EnvFileSystem = {
21
+ /** @deprecated No longer called — kept for backward compatibility. */
22
+ readonly exists?: (path: string) => boolean;
23
+ readonly readFile: (path: string) => string;
24
+ };
25
+ /**
26
+ * Load environment variables from a `.clancy/.env` file.
27
+ *
28
+ * @param projectRoot - The root directory of the project containing `.clancy/`.
29
+ * @param fs - File system operations (injected for testability).
30
+ * @returns The parsed environment variables, or `undefined` if the file doesn't exist.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * import { readFileSync } from 'node:fs';
35
+ *
36
+ * const env = loadClancyEnv('/path/to/project', {
37
+ * readFile: (p) => readFileSync(p, 'utf8'),
38
+ * });
39
+ * ```
40
+ */
41
+ export declare const loadClancyEnv: (projectRoot: string, fs: EnvFileSystem) => Record<string, string> | undefined;
42
+ //# sourceMappingURL=env-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-parser.d.ts","sourceRoot":"","sources":["../../../src/shared/env-parser/env-parser.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAKtE,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,GACxB,aAAa,MAAM,EACnB,IAAI,aAAa,KAChB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAQ3B,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Clancy .env file parser.
3
+ *
4
+ * Reads key=value pairs from `.clancy/.env` files. Supports quoted values,
5
+ * comments, and blank lines. No third-party dependencies.
6
+ */
7
+ import { join } from 'node:path';
8
+ /**
9
+ * Strip surrounding quotes from a value string.
10
+ *
11
+ * Removes matched single or double quotes. Values shorter than 2 characters
12
+ * or with mismatched quotes are returned unchanged.
13
+ *
14
+ * @param value - The raw value string.
15
+ * @returns The value with surrounding quotes removed.
16
+ */
17
+ const stripQuotes = (value) => {
18
+ if (value.length < 2)
19
+ return value;
20
+ const first = value[0];
21
+ const last = value[value.length - 1];
22
+ const isDoubleQuoted = first === '"' && last === '"';
23
+ const isSingleQuoted = first === "'" && last === "'";
24
+ if (isDoubleQuoted || isSingleQuoted) {
25
+ return value.slice(1, -1);
26
+ }
27
+ return value;
28
+ };
29
+ /**
30
+ * Parse a single .env line into a key-value tuple, or undefined if invalid.
31
+ *
32
+ * @param line - A single line from a .env file.
33
+ * @returns A [key, value] tuple, or undefined for blank/comment/invalid lines.
34
+ */
35
+ const parseLine = (line) => {
36
+ const trimmed = line.trim();
37
+ if (!trimmed || trimmed.startsWith('#'))
38
+ return undefined;
39
+ const eqIndex = trimmed.indexOf('=');
40
+ if (eqIndex === -1)
41
+ return undefined;
42
+ const key = trimmed.slice(0, eqIndex).trim();
43
+ if (!key)
44
+ return undefined;
45
+ const value = stripQuotes(trimmed.slice(eqIndex + 1).trim());
46
+ return [key, value];
47
+ };
48
+ /** Type guard to filter out undefined entries from parsed lines. */
49
+ const isDefined = (entry) => entry !== undefined;
50
+ /**
51
+ * Parse a .env file content string into a key-value record.
52
+ *
53
+ * Handles single-quoted, double-quoted, and unquoted values.
54
+ * Ignores blank lines and lines starting with `#`. Does not process
55
+ * escape sequences (e.g. `\"` within quoted values). Duplicate keys
56
+ * resolve to the last value.
57
+ *
58
+ * @param content - The raw .env file content.
59
+ * @returns A record of environment variable key-value pairs.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * parseEnvContent('JIRA_BASE_URL=https://example.atlassian.net\nJIRA_USER=user@example.com');
64
+ * // { JIRA_BASE_URL: 'https://example.atlassian.net', JIRA_USER: 'user@example.com' }
65
+ * ```
66
+ */
67
+ export const parseEnvContent = (content) => {
68
+ const lines = content.split('\n');
69
+ const entries = lines.map(parseLine).filter(isDefined);
70
+ return Object.fromEntries(entries);
71
+ };
72
+ /**
73
+ * Load environment variables from a `.clancy/.env` file.
74
+ *
75
+ * @param projectRoot - The root directory of the project containing `.clancy/`.
76
+ * @param fs - File system operations (injected for testability).
77
+ * @returns The parsed environment variables, or `undefined` if the file doesn't exist.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * import { readFileSync } from 'node:fs';
82
+ *
83
+ * const env = loadClancyEnv('/path/to/project', {
84
+ * readFile: (p) => readFileSync(p, 'utf8'),
85
+ * });
86
+ * ```
87
+ */
88
+ export const loadClancyEnv = (projectRoot, fs) => {
89
+ const envPath = join(projectRoot, '.clancy', '.env');
90
+ try {
91
+ return parseEnvContent(fs.readFile(envPath));
92
+ }
93
+ catch {
94
+ return undefined;
95
+ }
96
+ };
97
+ //# sourceMappingURL=env-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-parser.js","sourceRoot":"","sources":["../../../src/shared/env-parser/env-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;;;;;GAQG;AACH,MAAM,WAAW,GAAG,CAAC,KAAa,EAAU,EAAE;IAC5C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAEnC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,KAAK,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC;IACrD,MAAM,cAAc,GAAG,KAAK,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC;IAErD,IAAI,cAAc,IAAI,cAAc,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,SAAS,GAAG,CAAC,IAAY,EAAyC,EAAE;IACxE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAE5B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAE1D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAErC,IAAI,OAAO,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAErC,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IAE7C,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAE3B,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,CAAC,GAAG,EAAE,KAAK,CAAU,CAAC;AAC/B,CAAC,CAAC;AAEF,oEAAoE;AACpE,MAAM,SAAS,GAAG,CAChB,KAA4C,EACR,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAe,EAA0B,EAAE;IACzE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAEvD,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AASF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,WAAmB,EACnB,EAAiB,EACmB,EAAE;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAErD,IAAI,CAAC;QACH,OAAO,eAAe,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { EnvFileSystem } from './env-parser.js';
2
+ export { loadClancyEnv, parseEnvContent } from './env-parser.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/env-parser/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { loadClancyEnv, parseEnvContent } from './env-parser.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/env-parser/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Git operations — command wrappers with dependency-injected exec.
3
+ *
4
+ * Wraps common git commands used during the ticket lifecycle:
5
+ * branch creation, checkout, squash merge, push, and cleanup.
6
+ * The `exec` function is injected for testability — no direct
7
+ * `child_process` imports in this module.
8
+ */
9
+ import type { RemoteInfo } from '../../types/index.js';
10
+ /** Execute a git sub-command and return stdout. Throws on non-zero exit. */
11
+ export type ExecGit = (args: readonly string[]) => string;
12
+ /**
13
+ * Check whether a branch name is safe for use in git ref paths.
14
+ *
15
+ * Rejects path traversal (`..`) and absolute paths (`/` prefix) that
16
+ * could resolve to unexpected refs when interpolated into `refs/heads/`.
17
+ *
18
+ * @param branch - The branch name to validate.
19
+ * @returns `true` if the branch name is safe.
20
+ */
21
+ export declare function isSafeBranchName(branch: string): boolean;
22
+ /**
23
+ * Get the name of the currently checked-out branch.
24
+ *
25
+ * @param exec - Injected git executor.
26
+ * @returns The current branch name.
27
+ */
28
+ export declare function currentBranch(exec: ExecGit): string;
29
+ /**
30
+ * Check whether the working directory has uncommitted changes.
31
+ *
32
+ * @param exec - Injected git executor.
33
+ * @returns `true` if there are staged or unstaged changes.
34
+ */
35
+ export declare function hasUncommittedChanges(exec: ExecGit): boolean;
36
+ /**
37
+ * Check whether a local branch exists.
38
+ *
39
+ * @param exec - Injected git executor.
40
+ * @param branch - The branch name to check.
41
+ * @returns `true` if the branch exists locally.
42
+ */
43
+ export declare function branchExists(exec: ExecGit, branch: string): boolean;
44
+ /**
45
+ * Create a branch from a base branch if it doesn't already exist.
46
+ *
47
+ * @param exec - Injected git executor.
48
+ * @param branch - The branch name to create.
49
+ * @param baseBranch - The base branch to create from.
50
+ */
51
+ export declare function ensureBranch(exec: ExecGit, branch: string, baseBranch: string): void;
52
+ /**
53
+ * Check out a branch. Uses `-B` flag to force-create if needed.
54
+ *
55
+ * @param exec - Injected git executor.
56
+ * @param branch - The branch name to check out.
57
+ * @param force - If `true`, uses `-B` to force-create/reset the branch.
58
+ */
59
+ export declare function checkout(exec: ExecGit, branch: string, force?: boolean): void;
60
+ /**
61
+ * Squash merge a source branch into the currently checked-out branch
62
+ * and commit with the given message.
63
+ *
64
+ * @param exec - Injected git executor.
65
+ * @param sourceBranch - The branch to squash merge from.
66
+ * @param commitMessage - The commit message for the squash merge.
67
+ * @returns `true` if changes were committed, `false` if nothing to commit.
68
+ */
69
+ export declare function squashMerge(exec: ExecGit, sourceBranch: string, commitMessage: string): boolean;
70
+ /**
71
+ * Delete a local branch (force).
72
+ *
73
+ * Uses `-D` because squash merges leave the branch in an "unmerged"
74
+ * state from git's perspective, causing `-d` to fail.
75
+ *
76
+ * @param exec - Injected git executor.
77
+ * @param branch - The branch name to delete.
78
+ */
79
+ export declare function deleteBranch(exec: ExecGit, branch: string): void;
80
+ /**
81
+ * Check whether a branch exists on the remote (without fetching it).
82
+ *
83
+ * @param exec - Injected git executor.
84
+ * @param branch - The branch name to check.
85
+ * @returns `true` if the branch exists on the remote.
86
+ */
87
+ export declare function remoteBranchExists(exec: ExecGit, branch: string): boolean;
88
+ /**
89
+ * Fetch a remote branch into a local branch of the same name.
90
+ *
91
+ * @param exec - Injected git executor.
92
+ * @param branch - The branch name to fetch from the remote.
93
+ * @returns `true` if the fetch succeeded, `false` if it doesn't exist.
94
+ */
95
+ export declare function fetchRemoteBranch(exec: ExecGit, branch: string): boolean;
96
+ /**
97
+ * Get the diff stat between the current branch and a target branch.
98
+ *
99
+ * Truncated to `maxLength` characters to avoid oversized prompts.
100
+ *
101
+ * @param exec - Injected git executor.
102
+ * @param targetBranch - The branch to diff against.
103
+ * @param maxLength - Maximum output length (default 8000).
104
+ * @returns The diff stat output, or `undefined` on failure.
105
+ */
106
+ export declare function diffAgainstBranch(exec: ExecGit, targetBranch: string, maxLength?: number): string | undefined;
107
+ /**
108
+ * Push a branch to the remote origin with upstream tracking.
109
+ *
110
+ * @param exec - Injected git executor.
111
+ * @param branch - The branch name to push.
112
+ * @returns `true` if the push succeeded, `false` on failure.
113
+ */
114
+ export declare function pushBranch(exec: ExecGit, branch: string): boolean;
115
+ /**
116
+ * Detect the remote origin and parse it into {@link RemoteInfo}.
117
+ *
118
+ * Shells out to `git remote get-url origin` via the injected exec.
119
+ * If `platformOverride` is a valid {@link GitPlatform}, it forces
120
+ * that platform instead of detecting from the hostname.
121
+ *
122
+ * @param exec - Injected git executor.
123
+ * @param platformOverride - Optional platform string (from `CLANCY_GIT_PLATFORM` env var).
124
+ * @returns Parsed remote info, or `{ host: 'none' }` when no remote exists.
125
+ */
126
+ export declare function detectRemote(exec: ExecGit, platformOverride?: string): RemoteInfo;
127
+ //# sourceMappingURL=git-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-ops.d.ts","sourceRoot":"","sources":["../../../src/shared/git-ops/git-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIlE,4EAA4E;AAC5E,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,MAAM,CAAC;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAWD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAQ5D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CASnE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,IAAI,CAIN;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAG3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,EACb,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,CAUT;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOzE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,YAAY,EAAE,MAAM,EACpB,SAAS,SAAO,GACf,MAAM,GAAG,SAAS,CAUpB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOjE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,OAAO,EACb,gBAAgB,CAAC,EAAE,MAAM,GACxB,UAAU,CASZ"}
@@ -0,0 +1,225 @@
1
+ import { parseRemote } from '../../shared/remote/index.js';
2
+ /**
3
+ * Check whether a branch name is safe for use in git ref paths.
4
+ *
5
+ * Rejects path traversal (`..`) and absolute paths (`/` prefix) that
6
+ * could resolve to unexpected refs when interpolated into `refs/heads/`.
7
+ *
8
+ * @param branch - The branch name to validate.
9
+ * @returns `true` if the branch name is safe.
10
+ */
11
+ export function isSafeBranchName(branch) {
12
+ return branch.length > 0 && !branch.includes('..') && !branch.startsWith('/');
13
+ }
14
+ /** Valid values for the `CLANCY_GIT_PLATFORM` env var override. Must stay in sync with {@link GitPlatform}. */
15
+ const VALID_PLATFORMS = new Set([
16
+ 'github',
17
+ 'gitlab',
18
+ 'bitbucket',
19
+ 'bitbucket-server',
20
+ 'azure',
21
+ ]);
22
+ /**
23
+ * Get the name of the currently checked-out branch.
24
+ *
25
+ * @param exec - Injected git executor.
26
+ * @returns The current branch name.
27
+ */
28
+ export function currentBranch(exec) {
29
+ return exec(['rev-parse', '--abbrev-ref', 'HEAD']).trim();
30
+ }
31
+ /**
32
+ * Check whether the working directory has uncommitted changes.
33
+ *
34
+ * @param exec - Injected git executor.
35
+ * @returns `true` if there are staged or unstaged changes.
36
+ */
37
+ export function hasUncommittedChanges(exec) {
38
+ try {
39
+ exec(['diff', '--quiet']);
40
+ exec(['diff', '--cached', '--quiet']);
41
+ return false;
42
+ }
43
+ catch {
44
+ return true;
45
+ }
46
+ }
47
+ /**
48
+ * Check whether a local branch exists.
49
+ *
50
+ * @param exec - Injected git executor.
51
+ * @param branch - The branch name to check.
52
+ * @returns `true` if the branch exists locally.
53
+ */
54
+ export function branchExists(exec, branch) {
55
+ if (!isSafeBranchName(branch))
56
+ return false;
57
+ try {
58
+ exec(['show-ref', '--verify', '--quiet', `refs/heads/${branch}`]);
59
+ return true;
60
+ }
61
+ catch {
62
+ return false;
63
+ }
64
+ }
65
+ /**
66
+ * Create a branch from a base branch if it doesn't already exist.
67
+ *
68
+ * @param exec - Injected git executor.
69
+ * @param branch - The branch name to create.
70
+ * @param baseBranch - The base branch to create from.
71
+ */
72
+ export function ensureBranch(exec, branch, baseBranch) {
73
+ if (!branchExists(exec, branch)) {
74
+ exec(['checkout', '-b', branch, baseBranch]);
75
+ }
76
+ }
77
+ /**
78
+ * Check out a branch. Uses `-B` flag to force-create if needed.
79
+ *
80
+ * @param exec - Injected git executor.
81
+ * @param branch - The branch name to check out.
82
+ * @param force - If `true`, uses `-B` to force-create/reset the branch.
83
+ */
84
+ export function checkout(exec, branch, force = false) {
85
+ const flag = force ? ['-B'] : [];
86
+ exec(['checkout', ...flag, branch]);
87
+ }
88
+ /**
89
+ * Squash merge a source branch into the currently checked-out branch
90
+ * and commit with the given message.
91
+ *
92
+ * @param exec - Injected git executor.
93
+ * @param sourceBranch - The branch to squash merge from.
94
+ * @param commitMessage - The commit message for the squash merge.
95
+ * @returns `true` if changes were committed, `false` if nothing to commit.
96
+ */
97
+ export function squashMerge(exec, sourceBranch, commitMessage) {
98
+ exec(['merge', '--squash', sourceBranch]);
99
+ try {
100
+ exec(['diff', '--cached', '--quiet']);
101
+ return false;
102
+ }
103
+ catch {
104
+ exec(['commit', '-m', commitMessage]);
105
+ return true;
106
+ }
107
+ }
108
+ /**
109
+ * Delete a local branch (force).
110
+ *
111
+ * Uses `-D` because squash merges leave the branch in an "unmerged"
112
+ * state from git's perspective, causing `-d` to fail.
113
+ *
114
+ * @param exec - Injected git executor.
115
+ * @param branch - The branch name to delete.
116
+ */
117
+ export function deleteBranch(exec, branch) {
118
+ exec(['branch', '-D', branch]);
119
+ }
120
+ /**
121
+ * Check whether a branch exists on the remote (without fetching it).
122
+ *
123
+ * @param exec - Injected git executor.
124
+ * @param branch - The branch name to check.
125
+ * @returns `true` if the branch exists on the remote.
126
+ */
127
+ export function remoteBranchExists(exec, branch) {
128
+ try {
129
+ const output = exec(['ls-remote', '--heads', 'origin', branch]).trim();
130
+ return output.length > 0;
131
+ }
132
+ catch {
133
+ return false;
134
+ }
135
+ }
136
+ /**
137
+ * Fetch a remote branch into a local branch of the same name.
138
+ *
139
+ * @param exec - Injected git executor.
140
+ * @param branch - The branch name to fetch from the remote.
141
+ * @returns `true` if the fetch succeeded, `false` if it doesn't exist.
142
+ */
143
+ export function fetchRemoteBranch(exec, branch) {
144
+ try {
145
+ exec(['fetch', 'origin', `${branch}:${branch}`]);
146
+ return true;
147
+ }
148
+ catch {
149
+ return false;
150
+ }
151
+ }
152
+ /**
153
+ * Get the diff stat between the current branch and a target branch.
154
+ *
155
+ * Truncated to `maxLength` characters to avoid oversized prompts.
156
+ *
157
+ * @param exec - Injected git executor.
158
+ * @param targetBranch - The branch to diff against.
159
+ * @param maxLength - Maximum output length (default 8000).
160
+ * @returns The diff stat output, or `undefined` on failure.
161
+ */
162
+ export function diffAgainstBranch(exec, targetBranch, maxLength = 8000) {
163
+ try {
164
+ const output = exec(['diff', `${targetBranch}...HEAD`, '--stat']).trim();
165
+ if (!output)
166
+ return undefined;
167
+ if (output.length <= maxLength)
168
+ return output;
169
+ return output.slice(0, maxLength) + '\n... (truncated)';
170
+ }
171
+ catch {
172
+ return undefined;
173
+ }
174
+ }
175
+ /**
176
+ * Push a branch to the remote origin with upstream tracking.
177
+ *
178
+ * @param exec - Injected git executor.
179
+ * @param branch - The branch name to push.
180
+ * @returns `true` if the push succeeded, `false` on failure.
181
+ */
182
+ export function pushBranch(exec, branch) {
183
+ try {
184
+ exec(['push', '-u', 'origin', branch]);
185
+ return true;
186
+ }
187
+ catch {
188
+ return false;
189
+ }
190
+ }
191
+ /**
192
+ * Detect the remote origin and parse it into {@link RemoteInfo}.
193
+ *
194
+ * Shells out to `git remote get-url origin` via the injected exec.
195
+ * If `platformOverride` is a valid {@link GitPlatform}, it forces
196
+ * that platform instead of detecting from the hostname.
197
+ *
198
+ * @param exec - Injected git executor.
199
+ * @param platformOverride - Optional platform string (from `CLANCY_GIT_PLATFORM` env var).
200
+ * @returns Parsed remote info, or `{ host: 'none' }` when no remote exists.
201
+ */
202
+ export function detectRemote(exec, platformOverride) {
203
+ const rawUrl = safeExec(exec, ['remote', 'get-url', 'origin']);
204
+ if (!rawUrl)
205
+ return { host: 'none' };
206
+ const validOverride = isValidPlatform(platformOverride)
207
+ ? platformOverride
208
+ : undefined;
209
+ return parseRemote(rawUrl, validOverride);
210
+ }
211
+ /** Run exec and return trimmed stdout, or `undefined` on failure/empty. */
212
+ function safeExec(exec, args) {
213
+ try {
214
+ const output = exec(args).trim();
215
+ return output || undefined;
216
+ }
217
+ catch {
218
+ return undefined;
219
+ }
220
+ }
221
+ /** Type guard: is the value a valid {@link GitPlatform} override? */
222
+ function isValidPlatform(value) {
223
+ return value !== undefined && VALID_PLATFORMS.has(value);
224
+ }
225
+ //# sourceMappingURL=git-ops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-ops.js","sourceRoot":"","sources":["../../../src/shared/git-ops/git-ops.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export type { ExecGit } from './git-ops.js';
2
+ export { branchExists, checkout, currentBranch, detectRemote, ensureBranch, fetchRemoteBranch, hasUncommittedChanges, pushBranch, remoteBranchExists, } from './git-ops.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/git-ops/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,kBAAkB,GACnB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { branchExists, checkout, currentBranch, detectRemote, ensureBranch, fetchRemoteBranch, hasUncommittedChanges, pushBranch, remoteBranchExists, } from './git-ops.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/git-ops/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,kBAAkB,GACnB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { SharedEnv } from '../../schemas/env/env.js';
2
+ import type { RemoteInfo } from '../../types/remote.js';
3
+ /** Resolved git host credentials. */
4
+ type GitCredentials = {
5
+ readonly token: string;
6
+ readonly username?: string;
7
+ };
8
+ /**
9
+ * Resolve a git host token from the board config's env.
10
+ *
11
+ * Switches on `remote.host` to extract the correct credential from the
12
+ * shared env vars (`GITHUB_TOKEN`, `GITLAB_TOKEN`, `BITBUCKET_*`, `AZDO_PAT`).
13
+ *
14
+ * @returns Credentials for the git platform, or `undefined` if none found.
15
+ */
16
+ export declare function resolveGitToken(env: SharedEnv, remote: RemoteInfo): GitCredentials | undefined;
17
+ export {};
18
+ //# sourceMappingURL=git-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-token.d.ts","sourceRoot":"","sources":["../../../src/shared/git-token/git-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,qCAAqC;AACrC,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAaF;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,UAAU,GACjB,cAAc,GAAG,SAAS,CAS5B"}
@@ -0,0 +1,28 @@
1
+ /** Map a git platform to its simple token env var. */
2
+ function simpleToken(env, host) {
3
+ const tokenMap = {
4
+ github: env.GITHUB_TOKEN,
5
+ gitlab: env.GITLAB_TOKEN,
6
+ 'bitbucket-server': env.BITBUCKET_TOKEN,
7
+ azure: env.AZDO_PAT,
8
+ };
9
+ return tokenMap[host];
10
+ }
11
+ /**
12
+ * Resolve a git host token from the board config's env.
13
+ *
14
+ * Switches on `remote.host` to extract the correct credential from the
15
+ * shared env vars (`GITHUB_TOKEN`, `GITLAB_TOKEN`, `BITBUCKET_*`, `AZDO_PAT`).
16
+ *
17
+ * @returns Credentials for the git platform, or `undefined` if none found.
18
+ */
19
+ export function resolveGitToken(env, remote) {
20
+ if (remote.host === 'bitbucket') {
21
+ return env.BITBUCKET_USER && env.BITBUCKET_TOKEN
22
+ ? { token: env.BITBUCKET_TOKEN, username: env.BITBUCKET_USER }
23
+ : undefined;
24
+ }
25
+ const token = simpleToken(env, remote.host);
26
+ return token ? { token } : undefined;
27
+ }
28
+ //# sourceMappingURL=git-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-token.js","sourceRoot":"","sources":["../../../src/shared/git-token/git-token.ts"],"names":[],"mappings":"AASA,sDAAsD;AACtD,SAAS,WAAW,CAAC,GAAc,EAAE,IAAY;IAC/C,MAAM,QAAQ,GAAuC;QACnD,MAAM,EAAE,GAAG,CAAC,YAAY;QACxB,MAAM,EAAE,GAAG,CAAC,YAAY;QACxB,kBAAkB,EAAE,GAAG,CAAC,eAAe;QACvC,KAAK,EAAE,GAAG,CAAC,QAAQ;KACpB,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,GAAc,EACd,MAAkB;IAElB,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,eAAe;YAC9C,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,eAAe,EAAE,QAAQ,EAAE,GAAG,CAAC,cAAc,EAAE;YAC9D,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACvC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { resolveGitToken } from './git-token.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/git-token/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}