@ttctl/cli 0.0.0 → 0.1.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/README.md +44 -9
  2. package/dist/commands/applications/index.d.ts +21 -0
  3. package/dist/commands/applications/index.d.ts.map +1 -0
  4. package/dist/commands/applications/index.js +87 -0
  5. package/dist/commands/applications/index.js.map +1 -0
  6. package/dist/commands/applications/list.d.ts +55 -0
  7. package/dist/commands/applications/list.d.ts.map +1 -0
  8. package/dist/commands/applications/list.js +106 -0
  9. package/dist/commands/applications/list.js.map +1 -0
  10. package/dist/commands/applications/shared.d.ts +14 -0
  11. package/dist/commands/applications/shared.d.ts.map +1 -0
  12. package/dist/commands/applications/shared.js +19 -0
  13. package/dist/commands/applications/shared.js.map +1 -0
  14. package/dist/commands/applications/show.d.ts +51 -0
  15. package/dist/commands/applications/show.d.ts.map +1 -0
  16. package/dist/commands/applications/show.js +154 -0
  17. package/dist/commands/applications/show.js.map +1 -0
  18. package/dist/commands/applications/stats.d.ts +42 -0
  19. package/dist/commands/applications/stats.d.ts.map +1 -0
  20. package/dist/commands/applications/stats.js +69 -0
  21. package/dist/commands/applications/stats.js.map +1 -0
  22. package/dist/commands/auth/index.d.ts +17 -0
  23. package/dist/commands/auth/index.d.ts.map +1 -0
  24. package/dist/commands/auth/index.js +69 -0
  25. package/dist/commands/auth/index.js.map +1 -0
  26. package/dist/commands/auth/init.d.ts +98 -0
  27. package/dist/commands/auth/init.d.ts.map +1 -0
  28. package/dist/commands/auth/init.js +387 -0
  29. package/dist/commands/auth/init.js.map +1 -0
  30. package/dist/commands/auth/signin.d.ts +81 -0
  31. package/dist/commands/auth/signin.d.ts.map +1 -0
  32. package/dist/commands/auth/signin.js +145 -0
  33. package/dist/commands/auth/signin.js.map +1 -0
  34. package/dist/commands/auth/signout.d.ts +133 -0
  35. package/dist/commands/auth/signout.d.ts.map +1 -0
  36. package/dist/commands/auth/signout.js +172 -0
  37. package/dist/commands/auth/signout.js.map +1 -0
  38. package/dist/commands/auth/status.d.ts +62 -0
  39. package/dist/commands/auth/status.d.ts.map +1 -0
  40. package/dist/commands/auth/status.js +98 -0
  41. package/dist/commands/auth/status.js.map +1 -0
  42. package/dist/commands/availability/allocated-hours.d.ts +27 -0
  43. package/dist/commands/availability/allocated-hours.d.ts.map +1 -0
  44. package/dist/commands/availability/allocated-hours.js +61 -0
  45. package/dist/commands/availability/allocated-hours.js.map +1 -0
  46. package/dist/commands/availability/index.d.ts +30 -0
  47. package/dist/commands/availability/index.d.ts.map +1 -0
  48. package/dist/commands/availability/index.js +124 -0
  49. package/dist/commands/availability/index.js.map +1 -0
  50. package/dist/commands/availability/shared.d.ts +11 -0
  51. package/dist/commands/availability/shared.d.ts.map +1 -0
  52. package/dist/commands/availability/shared.js +30 -0
  53. package/dist/commands/availability/shared.js.map +1 -0
  54. package/dist/commands/availability/show.d.ts +32 -0
  55. package/dist/commands/availability/show.d.ts.map +1 -0
  56. package/dist/commands/availability/show.js +86 -0
  57. package/dist/commands/availability/show.js.map +1 -0
  58. package/dist/commands/availability/working-hours.d.ts +53 -0
  59. package/dist/commands/availability/working-hours.d.ts.map +1 -0
  60. package/dist/commands/availability/working-hours.js +151 -0
  61. package/dist/commands/availability/working-hours.js.map +1 -0
  62. package/dist/commands/contracts/index.d.ts +69 -0
  63. package/dist/commands/contracts/index.d.ts.map +1 -0
  64. package/dist/commands/contracts/index.js +198 -0
  65. package/dist/commands/contracts/index.js.map +1 -0
  66. package/dist/commands/engagements/breaks.d.ts +81 -0
  67. package/dist/commands/engagements/breaks.d.ts.map +1 -0
  68. package/dist/commands/engagements/breaks.js +229 -0
  69. package/dist/commands/engagements/breaks.js.map +1 -0
  70. package/dist/commands/engagements/index.d.ts +29 -0
  71. package/dist/commands/engagements/index.d.ts.map +1 -0
  72. package/dist/commands/engagements/index.js +172 -0
  73. package/dist/commands/engagements/index.js.map +1 -0
  74. package/dist/commands/engagements/list.d.ts +49 -0
  75. package/dist/commands/engagements/list.d.ts.map +1 -0
  76. package/dist/commands/engagements/list.js +95 -0
  77. package/dist/commands/engagements/list.js.map +1 -0
  78. package/dist/commands/engagements/shared.d.ts +10 -0
  79. package/dist/commands/engagements/shared.d.ts.map +1 -0
  80. package/dist/commands/engagements/shared.js +31 -0
  81. package/dist/commands/engagements/shared.js.map +1 -0
  82. package/dist/commands/engagements/show.d.ts +19 -0
  83. package/dist/commands/engagements/show.d.ts.map +1 -0
  84. package/dist/commands/engagements/show.js +150 -0
  85. package/dist/commands/engagements/show.js.map +1 -0
  86. package/dist/commands/engagements/stats.d.ts +24 -0
  87. package/dist/commands/engagements/stats.d.ts.map +1 -0
  88. package/dist/commands/engagements/stats.js +51 -0
  89. package/dist/commands/engagements/stats.js.map +1 -0
  90. package/dist/commands/jobs/index.d.ts +49 -0
  91. package/dist/commands/jobs/index.d.ts.map +1 -0
  92. package/dist/commands/jobs/index.js +304 -0
  93. package/dist/commands/jobs/index.js.map +1 -0
  94. package/dist/commands/jobs/interest.d.ts +65 -0
  95. package/dist/commands/jobs/interest.d.ts.map +1 -0
  96. package/dist/commands/jobs/interest.js +172 -0
  97. package/dist/commands/jobs/interest.js.map +1 -0
  98. package/dist/commands/jobs/list.d.ts +81 -0
  99. package/dist/commands/jobs/list.d.ts.map +1 -0
  100. package/dist/commands/jobs/list.js +157 -0
  101. package/dist/commands/jobs/list.js.map +1 -0
  102. package/dist/commands/jobs/search.d.ts +71 -0
  103. package/dist/commands/jobs/search.d.ts.map +1 -0
  104. package/dist/commands/jobs/search.js +163 -0
  105. package/dist/commands/jobs/search.js.map +1 -0
  106. package/dist/commands/jobs/shared.d.ts +79 -0
  107. package/dist/commands/jobs/shared.d.ts.map +1 -0
  108. package/dist/commands/jobs/shared.js +133 -0
  109. package/dist/commands/jobs/shared.js.map +1 -0
  110. package/dist/commands/jobs/show.d.ts +20 -0
  111. package/dist/commands/jobs/show.d.ts.map +1 -0
  112. package/dist/commands/jobs/show.js +135 -0
  113. package/dist/commands/jobs/show.js.map +1 -0
  114. package/dist/commands/payments/index.d.ts +34 -0
  115. package/dist/commands/payments/index.d.ts.map +1 -0
  116. package/dist/commands/payments/index.js +160 -0
  117. package/dist/commands/payments/index.js.map +1 -0
  118. package/dist/commands/payments/methods.d.ts +17 -0
  119. package/dist/commands/payments/methods.d.ts.map +1 -0
  120. package/dist/commands/payments/methods.js +79 -0
  121. package/dist/commands/payments/methods.js.map +1 -0
  122. package/dist/commands/payments/payouts.d.ts +44 -0
  123. package/dist/commands/payments/payouts.d.ts.map +1 -0
  124. package/dist/commands/payments/payouts.js +147 -0
  125. package/dist/commands/payments/payouts.js.map +1 -0
  126. package/dist/commands/payments/rate.d.ts +48 -0
  127. package/dist/commands/payments/rate.d.ts.map +1 -0
  128. package/dist/commands/payments/rate.js +229 -0
  129. package/dist/commands/payments/rate.js.map +1 -0
  130. package/dist/commands/payments/shared.d.ts +10 -0
  131. package/dist/commands/payments/shared.d.ts.map +1 -0
  132. package/dist/commands/payments/shared.js +27 -0
  133. package/dist/commands/payments/shared.js.map +1 -0
  134. package/dist/commands/profile/basic/index.d.ts +18 -0
  135. package/dist/commands/profile/basic/index.d.ts.map +1 -0
  136. package/dist/commands/profile/basic/index.js +79 -0
  137. package/dist/commands/profile/basic/index.js.map +1 -0
  138. package/dist/commands/profile/basic/photo-show.d.ts +28 -0
  139. package/dist/commands/profile/basic/photo-show.d.ts.map +1 -0
  140. package/dist/commands/profile/basic/photo-show.js +112 -0
  141. package/dist/commands/profile/basic/photo-show.js.map +1 -0
  142. package/dist/commands/profile/basic/photo-upload.d.ts +10 -0
  143. package/dist/commands/profile/basic/photo-upload.d.ts.map +1 -0
  144. package/dist/commands/profile/basic/photo-upload.js +61 -0
  145. package/dist/commands/profile/basic/photo-upload.js.map +1 -0
  146. package/dist/commands/profile/basic/set.d.ts +54 -0
  147. package/dist/commands/profile/basic/set.d.ts.map +1 -0
  148. package/dist/commands/profile/basic/set.js +174 -0
  149. package/dist/commands/profile/basic/set.js.map +1 -0
  150. package/dist/commands/profile/basic/show.d.ts +95 -0
  151. package/dist/commands/profile/basic/show.d.ts.map +1 -0
  152. package/dist/commands/profile/basic/show.js +310 -0
  153. package/dist/commands/profile/basic/show.js.map +1 -0
  154. package/dist/commands/profile/certifications/index.d.ts +40 -0
  155. package/dist/commands/profile/certifications/index.d.ts.map +1 -0
  156. package/dist/commands/profile/certifications/index.js +350 -0
  157. package/dist/commands/profile/certifications/index.js.map +1 -0
  158. package/dist/commands/profile/education/index.d.ts +37 -0
  159. package/dist/commands/profile/education/index.d.ts.map +1 -0
  160. package/dist/commands/profile/education/index.js +331 -0
  161. package/dist/commands/profile/education/index.js.map +1 -0
  162. package/dist/commands/profile/employment/index.d.ts +49 -0
  163. package/dist/commands/profile/employment/index.d.ts.map +1 -0
  164. package/dist/commands/profile/employment/index.js +425 -0
  165. package/dist/commands/profile/employment/index.js.map +1 -0
  166. package/dist/commands/profile/external/_shared.d.ts +35 -0
  167. package/dist/commands/profile/external/_shared.d.ts.map +1 -0
  168. package/dist/commands/profile/external/_shared.js +59 -0
  169. package/dist/commands/profile/external/_shared.js.map +1 -0
  170. package/dist/commands/profile/external/advanced-wizard-show.d.ts +15 -0
  171. package/dist/commands/profile/external/advanced-wizard-show.d.ts.map +1 -0
  172. package/dist/commands/profile/external/advanced-wizard-show.js +82 -0
  173. package/dist/commands/profile/external/advanced-wizard-show.js.map +1 -0
  174. package/dist/commands/profile/external/custom-requirements-set.d.ts +32 -0
  175. package/dist/commands/profile/external/custom-requirements-set.d.ts.map +1 -0
  176. package/dist/commands/profile/external/custom-requirements-set.js +116 -0
  177. package/dist/commands/profile/external/custom-requirements-set.js.map +1 -0
  178. package/dist/commands/profile/external/custom-requirements-show.d.ts +16 -0
  179. package/dist/commands/profile/external/custom-requirements-show.d.ts.map +1 -0
  180. package/dist/commands/profile/external/custom-requirements-show.js +84 -0
  181. package/dist/commands/profile/external/custom-requirements-show.js.map +1 -0
  182. package/dist/commands/profile/external/index.d.ts +21 -0
  183. package/dist/commands/profile/external/index.d.ts.map +1 -0
  184. package/dist/commands/profile/external/index.js +113 -0
  185. package/dist/commands/profile/external/index.js.map +1 -0
  186. package/dist/commands/profile/external/readiness.d.ts +15 -0
  187. package/dist/commands/profile/external/readiness.d.ts.map +1 -0
  188. package/dist/commands/profile/external/readiness.js +104 -0
  189. package/dist/commands/profile/external/readiness.js.map +1 -0
  190. package/dist/commands/profile/external/recommendations.d.ts +17 -0
  191. package/dist/commands/profile/external/recommendations.d.ts.map +1 -0
  192. package/dist/commands/profile/external/recommendations.js +97 -0
  193. package/dist/commands/profile/external/recommendations.js.map +1 -0
  194. package/dist/commands/profile/external/show.d.ts +22 -0
  195. package/dist/commands/profile/external/show.d.ts.map +1 -0
  196. package/dist/commands/profile/external/show.js +83 -0
  197. package/dist/commands/profile/external/show.js.map +1 -0
  198. package/dist/commands/profile/external/update.d.ts +37 -0
  199. package/dist/commands/profile/external/update.d.ts.map +1 -0
  200. package/dist/commands/profile/external/update.js +125 -0
  201. package/dist/commands/profile/external/update.js.map +1 -0
  202. package/dist/commands/profile/index.d.ts +16 -0
  203. package/dist/commands/profile/index.d.ts.map +1 -0
  204. package/dist/commands/profile/index.js +81 -0
  205. package/dist/commands/profile/index.js.map +1 -0
  206. package/dist/commands/profile/industries/index.d.ts +43 -0
  207. package/dist/commands/profile/industries/index.d.ts.map +1 -0
  208. package/dist/commands/profile/industries/index.js +258 -0
  209. package/dist/commands/profile/industries/index.js.map +1 -0
  210. package/dist/commands/profile/portfolio/add.d.ts +43 -0
  211. package/dist/commands/profile/portfolio/add.d.ts.map +1 -0
  212. package/dist/commands/profile/portfolio/add.js +181 -0
  213. package/dist/commands/profile/portfolio/add.js.map +1 -0
  214. package/dist/commands/profile/portfolio/highlight.d.ts +11 -0
  215. package/dist/commands/profile/portfolio/highlight.d.ts.map +1 -0
  216. package/dist/commands/profile/portfolio/highlight.js +31 -0
  217. package/dist/commands/profile/portfolio/highlight.js.map +1 -0
  218. package/dist/commands/profile/portfolio/index.d.ts +16 -0
  219. package/dist/commands/profile/portfolio/index.d.ts.map +1 -0
  220. package/dist/commands/profile/portfolio/index.js +121 -0
  221. package/dist/commands/profile/portfolio/index.js.map +1 -0
  222. package/dist/commands/profile/portfolio/list.d.ts +83 -0
  223. package/dist/commands/profile/portfolio/list.d.ts.map +1 -0
  224. package/dist/commands/profile/portfolio/list.js +189 -0
  225. package/dist/commands/profile/portfolio/list.js.map +1 -0
  226. package/dist/commands/profile/portfolio/remove.d.ts +9 -0
  227. package/dist/commands/profile/portfolio/remove.d.ts.map +1 -0
  228. package/dist/commands/profile/portfolio/remove.js +24 -0
  229. package/dist/commands/profile/portfolio/remove.js.map +1 -0
  230. package/dist/commands/profile/portfolio/reorder.d.ts +17 -0
  231. package/dist/commands/profile/portfolio/reorder.d.ts.map +1 -0
  232. package/dist/commands/profile/portfolio/reorder.js +135 -0
  233. package/dist/commands/profile/portfolio/reorder.js.map +1 -0
  234. package/dist/commands/profile/portfolio/shared.d.ts +8 -0
  235. package/dist/commands/profile/portfolio/shared.d.ts.map +1 -0
  236. package/dist/commands/profile/portfolio/shared.js +10 -0
  237. package/dist/commands/profile/portfolio/shared.js.map +1 -0
  238. package/dist/commands/profile/portfolio/update.d.ts +18 -0
  239. package/dist/commands/profile/portfolio/update.d.ts.map +1 -0
  240. package/dist/commands/profile/portfolio/update.js +77 -0
  241. package/dist/commands/profile/portfolio/update.js.map +1 -0
  242. package/dist/commands/profile/portfolio/upload.d.ts +8 -0
  243. package/dist/commands/profile/portfolio/upload.d.ts.map +1 -0
  244. package/dist/commands/profile/portfolio/upload.js +131 -0
  245. package/dist/commands/profile/portfolio/upload.js.map +1 -0
  246. package/dist/commands/profile/resume/cancel-upload.d.ts +9 -0
  247. package/dist/commands/profile/resume/cancel-upload.d.ts.map +1 -0
  248. package/dist/commands/profile/resume/cancel-upload.js +30 -0
  249. package/dist/commands/profile/resume/cancel-upload.js.map +1 -0
  250. package/dist/commands/profile/resume/index.d.ts +15 -0
  251. package/dist/commands/profile/resume/index.d.ts.map +1 -0
  252. package/dist/commands/profile/resume/index.js +42 -0
  253. package/dist/commands/profile/resume/index.js.map +1 -0
  254. package/dist/commands/profile/resume/upload.d.ts +16 -0
  255. package/dist/commands/profile/resume/upload.d.ts.map +1 -0
  256. package/dist/commands/profile/resume/upload.js +65 -0
  257. package/dist/commands/profile/resume/upload.js.map +1 -0
  258. package/dist/commands/profile/reviews/_shared.d.ts +9 -0
  259. package/dist/commands/profile/reviews/_shared.d.ts.map +1 -0
  260. package/dist/commands/profile/reviews/_shared.js +15 -0
  261. package/dist/commands/profile/reviews/_shared.js.map +1 -0
  262. package/dist/commands/profile/reviews/approve-item.d.ts +30 -0
  263. package/dist/commands/profile/reviews/approve-item.d.ts.map +1 -0
  264. package/dist/commands/profile/reviews/approve-item.js +82 -0
  265. package/dist/commands/profile/reviews/approve-item.js.map +1 -0
  266. package/dist/commands/profile/reviews/approve-section.d.ts +15 -0
  267. package/dist/commands/profile/reviews/approve-section.d.ts.map +1 -0
  268. package/dist/commands/profile/reviews/approve-section.js +67 -0
  269. package/dist/commands/profile/reviews/approve-section.js.map +1 -0
  270. package/dist/commands/profile/reviews/index.d.ts +19 -0
  271. package/dist/commands/profile/reviews/index.d.ts.map +1 -0
  272. package/dist/commands/profile/reviews/index.js +71 -0
  273. package/dist/commands/profile/reviews/index.js.map +1 -0
  274. package/dist/commands/profile/reviews/list.d.ts +17 -0
  275. package/dist/commands/profile/reviews/list.d.ts.map +1 -0
  276. package/dist/commands/profile/reviews/list.js +96 -0
  277. package/dist/commands/profile/reviews/list.js.map +1 -0
  278. package/dist/commands/profile/reviews/submit-for-review.d.ts +16 -0
  279. package/dist/commands/profile/reviews/submit-for-review.d.ts.map +1 -0
  280. package/dist/commands/profile/reviews/submit-for-review.js +65 -0
  281. package/dist/commands/profile/reviews/submit-for-review.js.map +1 -0
  282. package/dist/commands/profile/shared.d.ts +46 -0
  283. package/dist/commands/profile/shared.d.ts.map +1 -0
  284. package/dist/commands/profile/shared.js +111 -0
  285. package/dist/commands/profile/shared.js.map +1 -0
  286. package/dist/commands/profile/skills/index.d.ts +29 -0
  287. package/dist/commands/profile/skills/index.d.ts.map +1 -0
  288. package/dist/commands/profile/skills/index.js +475 -0
  289. package/dist/commands/profile/skills/index.js.map +1 -0
  290. package/dist/commands/profile/visas/add.d.ts +19 -0
  291. package/dist/commands/profile/visas/add.d.ts.map +1 -0
  292. package/dist/commands/profile/visas/add.js +37 -0
  293. package/dist/commands/profile/visas/add.js.map +1 -0
  294. package/dist/commands/profile/visas/index.d.ts +13 -0
  295. package/dist/commands/profile/visas/index.d.ts.map +1 -0
  296. package/dist/commands/profile/visas/index.js +69 -0
  297. package/dist/commands/profile/visas/index.js.map +1 -0
  298. package/dist/commands/profile/visas/list.d.ts +40 -0
  299. package/dist/commands/profile/visas/list.d.ts.map +1 -0
  300. package/dist/commands/profile/visas/list.js +115 -0
  301. package/dist/commands/profile/visas/list.js.map +1 -0
  302. package/dist/commands/profile/visas/remove.d.ts +8 -0
  303. package/dist/commands/profile/visas/remove.d.ts.map +1 -0
  304. package/dist/commands/profile/visas/remove.js +23 -0
  305. package/dist/commands/profile/visas/remove.js.map +1 -0
  306. package/dist/commands/profile/visas/shared.d.ts +11 -0
  307. package/dist/commands/profile/visas/shared.d.ts.map +1 -0
  308. package/dist/commands/profile/visas/shared.js +16 -0
  309. package/dist/commands/profile/visas/shared.js.map +1 -0
  310. package/dist/commands/profile/visas/update.d.ts +13 -0
  311. package/dist/commands/profile/visas/update.d.ts.map +1 -0
  312. package/dist/commands/profile/visas/update.js +44 -0
  313. package/dist/commands/profile/visas/update.js.map +1 -0
  314. package/dist/commands/timesheet/index.d.ts +24 -0
  315. package/dist/commands/timesheet/index.d.ts.map +1 -0
  316. package/dist/commands/timesheet/index.js +98 -0
  317. package/dist/commands/timesheet/index.js.map +1 -0
  318. package/dist/commands/timesheet/list.d.ts +40 -0
  319. package/dist/commands/timesheet/list.d.ts.map +1 -0
  320. package/dist/commands/timesheet/list.js +79 -0
  321. package/dist/commands/timesheet/list.js.map +1 -0
  322. package/dist/commands/timesheet/shared.d.ts +10 -0
  323. package/dist/commands/timesheet/shared.d.ts.map +1 -0
  324. package/dist/commands/timesheet/shared.js +35 -0
  325. package/dist/commands/timesheet/shared.js.map +1 -0
  326. package/dist/commands/timesheet/show.d.ts +19 -0
  327. package/dist/commands/timesheet/show.d.ts.map +1 -0
  328. package/dist/commands/timesheet/show.js +109 -0
  329. package/dist/commands/timesheet/show.js.map +1 -0
  330. package/dist/commands/timesheet/submit.d.ts +50 -0
  331. package/dist/commands/timesheet/submit.d.ts.map +1 -0
  332. package/dist/commands/timesheet/submit.js +151 -0
  333. package/dist/commands/timesheet/submit.js.map +1 -0
  334. package/dist/crash-handlers.d.ts +67 -0
  335. package/dist/crash-handlers.d.ts.map +1 -0
  336. package/dist/crash-handlers.js +78 -0
  337. package/dist/crash-handlers.js.map +1 -0
  338. package/dist/errors.d.ts +45 -0
  339. package/dist/errors.d.ts.map +1 -0
  340. package/dist/errors.js +57 -0
  341. package/dist/errors.js.map +1 -0
  342. package/dist/index.d.ts +8 -0
  343. package/dist/index.d.ts.map +1 -0
  344. package/dist/index.js +15 -0
  345. package/dist/index.js.map +1 -0
  346. package/dist/lib/config-context.d.ts +41 -0
  347. package/dist/lib/config-context.d.ts.map +1 -0
  348. package/dist/lib/config-context.js +74 -0
  349. package/dist/lib/config-context.js.map +1 -0
  350. package/dist/lib/dry-run.d.ts +70 -0
  351. package/dist/lib/dry-run.d.ts.map +1 -0
  352. package/dist/lib/dry-run.js +114 -0
  353. package/dist/lib/dry-run.js.map +1 -0
  354. package/dist/lib/empty-state-cta.d.ts +63 -0
  355. package/dist/lib/empty-state-cta.d.ts.map +1 -0
  356. package/dist/lib/empty-state-cta.js +88 -0
  357. package/dist/lib/empty-state-cta.js.map +1 -0
  358. package/dist/lib/envelopes.d.ts +540 -0
  359. package/dist/lib/envelopes.d.ts.map +1 -0
  360. package/dist/lib/envelopes.js +598 -0
  361. package/dist/lib/envelopes.js.map +1 -0
  362. package/dist/lib/error-routing.d.ts +49 -0
  363. package/dist/lib/error-routing.d.ts.map +1 -0
  364. package/dist/lib/error-routing.js +72 -0
  365. package/dist/lib/error-routing.js.map +1 -0
  366. package/dist/lib/format-helpers.d.ts +65 -0
  367. package/dist/lib/format-helpers.d.ts.map +1 -0
  368. package/dist/lib/format-helpers.js +79 -0
  369. package/dist/lib/format-helpers.js.map +1 -0
  370. package/dist/lib/format-overrides.d.ts +81 -0
  371. package/dist/lib/format-overrides.d.ts.map +1 -0
  372. package/dist/lib/format-overrides.js +55 -0
  373. package/dist/lib/format-overrides.js.map +1 -0
  374. package/dist/lib/freetext.d.ts +83 -0
  375. package/dist/lib/freetext.d.ts.map +1 -0
  376. package/dist/lib/freetext.js +182 -0
  377. package/dist/lib/freetext.js.map +1 -0
  378. package/dist/lib/kill-switch-hook.d.ts +49 -0
  379. package/dist/lib/kill-switch-hook.d.ts.map +1 -0
  380. package/dist/lib/kill-switch-hook.js +34 -0
  381. package/dist/lib/kill-switch-hook.js.map +1 -0
  382. package/dist/lib/output.d.ts +173 -0
  383. package/dist/lib/output.d.ts.map +1 -0
  384. package/dist/lib/output.js +177 -0
  385. package/dist/lib/output.js.map +1 -0
  386. package/dist/lib/pagination.d.ts +49 -0
  387. package/dist/lib/pagination.d.ts.map +1 -0
  388. package/dist/lib/pagination.js +36 -0
  389. package/dist/lib/pagination.js.map +1 -0
  390. package/dist/program.d.ts +80 -0
  391. package/dist/program.d.ts.map +1 -0
  392. package/dist/program.js +273 -0
  393. package/dist/program.js.map +1 -0
  394. package/package.json +35 -13
  395. package/index.js +0 -7
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ export { buildProgram } from "./program.js";
4
+ export { exitCodeForTtctlError, formatTtctlErrorMessage, presentTtctlError } from "./errors.js";
5
+ export { formatCrashLog, installCrashHandlers } from "./crash-handlers.js";
6
+ // Re-export the typed-error base so the umbrella package's top-level error
7
+ // handler can `instanceof`-check without a direct `@ttctl/core` dependency.
8
+ // CLI consumers typically catch concrete subclasses instead.
9
+ export { TtctlError } from "@ttctl/core";
10
+ // Also re-export ConfigError so the umbrella's MCP branch can render the
11
+ // startup-time `NO_CREDS` failure (#113 fail-fast contract) in the same
12
+ // uniform `Error (CODE): message` form the CLI surface uses, without
13
+ // pulling `@ttctl/core` as a direct dependency on the umbrella.
14
+ export { ConfigError } from "@ttctl/core";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAG3E,2EAA2E;AAC3E,4EAA4E;AAC5E,6DAA6D;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,yEAAyE;AACzE,wEAAwE;AACxE,qEAAqE;AACrE,gEAAgE;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { TtctlConfig } from "@ttctl/core";
2
+ /**
3
+ * Capture the explicit config path from the root program's `--config`
4
+ * global option. Called by the program's `preAction` hook before any
5
+ * sub-command runs. Pass `undefined` when `--config` was omitted.
6
+ */
7
+ export declare function setCliConfigPath(path: string | undefined): void;
8
+ /**
9
+ * Read the captured `--config` value. Returns `undefined` when `--config`
10
+ * was not passed; in that case `resolveConfigForCli` falls back to the
11
+ * core resolution chain.
12
+ *
13
+ * Exported primarily for tests and rare callers that need the raw value
14
+ * (e.g., to forward it to a subprocess via `TTCTL_CONFIG_FILE`).
15
+ */
16
+ export declare function getCliConfigPath(): string | undefined;
17
+ /**
18
+ * Reset the captured path. Tests call this in `beforeEach` to avoid
19
+ * bleeding state across cases. Not used in production.
20
+ */
21
+ export declare function resetCliConfigPath(): void;
22
+ /**
23
+ * The CLI surface's single entry point into the core's config resolver.
24
+ *
25
+ * Honors the explicit `--config` value captured by the root program's
26
+ * `preAction` hook; falls back to the core resolution chain
27
+ * (`TTCTL_CONFIG_FILE` → `$XDG_CONFIG_HOME/ttctl/config.yaml` →
28
+ * `~/.config/ttctl/config.yaml`) when `--config` was not passed.
29
+ *
30
+ * AC contract (#93): every CLI command that touches config MUST call
31
+ * `resolveConfigForCli()` rather than the bare `resolveConfig()` from
32
+ * `@ttctl/core`. The bare form re-triggers the env→default chain and
33
+ * silently ignores `--config` — that's the bug this wrapper exists to
34
+ * prevent. A grep over `packages/cli/src/` for `resolveConfig\(\)`
35
+ * (no args) should surface only this file.
36
+ */
37
+ export declare function resolveConfigForCli(): {
38
+ config: TtctlConfig;
39
+ path: string;
40
+ };
41
+ //# sourceMappingURL=config-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-context.d.ts","sourceRoot":"","sources":["../../src/lib/config-context.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyB/C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE/D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,IAAI;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAM3E"}
@@ -0,0 +1,74 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { resolveConfig } from "@ttctl/core";
4
+ /**
5
+ * Process-scoped holder for the explicit config path supplied via the
6
+ * root program's `--config <path>` global option.
7
+ *
8
+ * Set once by the root program's `preAction` hook (see `program.ts`) before
9
+ * any sub-command's action handler runs; read by every CLI call site that
10
+ * loads `.ttctl.yaml`. Holding the path in a module-level variable lets
11
+ * action handlers stay focused on their domain logic without each having to
12
+ * walk Commander's parent chain via `cmd.optsWithGlobals()` — every leaf
13
+ * already accepts a `commandLabel` string for error prefixing, and adding a
14
+ * `cmd: Command` parameter to ~25 handlers would be invasive.
15
+ *
16
+ * When undefined (i.e., `--config` was not passed), `resolveConfigForCli`
17
+ * falls back to the core resolution chain (`TTCTL_CONFIG_FILE` env var →
18
+ * `$XDG_CONFIG_HOME/ttctl/config.yaml` → `~/.config/ttctl/config.yaml`).
19
+ *
20
+ * Tests must call `resetCliConfigPath()` in `beforeEach` to avoid bleeding
21
+ * state across cases. The CLI surface invokes `setCliConfigPath` once per
22
+ * process via the program's `preAction` hook, so production code never sees
23
+ * stale values.
24
+ */
25
+ let cliConfigPath;
26
+ /**
27
+ * Capture the explicit config path from the root program's `--config`
28
+ * global option. Called by the program's `preAction` hook before any
29
+ * sub-command runs. Pass `undefined` when `--config` was omitted.
30
+ */
31
+ export function setCliConfigPath(path) {
32
+ cliConfigPath = path;
33
+ }
34
+ /**
35
+ * Read the captured `--config` value. Returns `undefined` when `--config`
36
+ * was not passed; in that case `resolveConfigForCli` falls back to the
37
+ * core resolution chain.
38
+ *
39
+ * Exported primarily for tests and rare callers that need the raw value
40
+ * (e.g., to forward it to a subprocess via `TTCTL_CONFIG_FILE`).
41
+ */
42
+ export function getCliConfigPath() {
43
+ return cliConfigPath;
44
+ }
45
+ /**
46
+ * Reset the captured path. Tests call this in `beforeEach` to avoid
47
+ * bleeding state across cases. Not used in production.
48
+ */
49
+ export function resetCliConfigPath() {
50
+ cliConfigPath = undefined;
51
+ }
52
+ /**
53
+ * The CLI surface's single entry point into the core's config resolver.
54
+ *
55
+ * Honors the explicit `--config` value captured by the root program's
56
+ * `preAction` hook; falls back to the core resolution chain
57
+ * (`TTCTL_CONFIG_FILE` → `$XDG_CONFIG_HOME/ttctl/config.yaml` →
58
+ * `~/.config/ttctl/config.yaml`) when `--config` was not passed.
59
+ *
60
+ * AC contract (#93): every CLI command that touches config MUST call
61
+ * `resolveConfigForCli()` rather than the bare `resolveConfig()` from
62
+ * `@ttctl/core`. The bare form re-triggers the env→default chain and
63
+ * silently ignores `--config` — that's the bug this wrapper exists to
64
+ * prevent. A grep over `packages/cli/src/` for `resolveConfig\(\)`
65
+ * (no args) should surface only this file.
66
+ */
67
+ export function resolveConfigForCli() {
68
+ // Conditionally include `path` so the `ResolveConfigOptions.path?: string`
69
+ // contract is honored under `exactOptionalPropertyTypes: true` — passing
70
+ // `{ path: undefined }` would be a type error even though the runtime
71
+ // semantics are identical to omitting the field.
72
+ return cliConfigPath !== undefined ? resolveConfig({ path: cliConfigPath }) : resolveConfig();
73
+ }
74
+ //# sourceMappingURL=config-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-context.js","sourceRoot":"","sources":["../../src/lib/config-context.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,IAAI,aAAiC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAwB;IACvD,aAAa,GAAG,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,aAAa,GAAG,SAAS,CAAC;AAC5B,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB;IACjC,2EAA2E;IAC3E,yEAAyE;IACzE,sEAAsE;IACtE,iDAAiD;IACjD,OAAO,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC;AAChG,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { Command } from "commander";
2
+ /**
3
+ * Capture the global `--dry-run` value from the root program's
4
+ * `preAction` hook. Pass `false` when the flag was omitted (Commander's
5
+ * default for boolean Options is `undefined`, which the hook normalises
6
+ * to `false` before invoking this setter).
7
+ */
8
+ export declare function setCliDryRun(value: boolean): void;
9
+ /**
10
+ * Read the captured `--dry-run` value. Returns `false` when the flag
11
+ * was not passed (the apply-path default).
12
+ *
13
+ * Mutation action handlers call this directly — when the leaf is marked
14
+ * as a mutation (see {@link markMutation}), the global flag has been
15
+ * captured and the handler is responsible for routing through the
16
+ * core's `dryRun` option.
17
+ */
18
+ export declare function getCliDryRun(): boolean;
19
+ /**
20
+ * Reset the captured value. Tests call this in `beforeEach` to avoid
21
+ * bleeding state across cases. Not used in production — the program's
22
+ * `preAction` hook calls `setCliDryRun` once per invocation, so stale
23
+ * values are not possible at runtime.
24
+ */
25
+ export declare function resetCliDryRun(): void;
26
+ /**
27
+ * Tag `cmd` as a mutation entry point. Mutation commands are responsible
28
+ * for routing the `--dry-run` flag through to the core layer's `dryRun`
29
+ * option; commands NOT tagged are treated as read-only / unsupported by
30
+ * the program's `preAction` hook (which emits a stderr no-op note when
31
+ * `--dry-run` is set on a non-mutation leaf).
32
+ *
33
+ * Tagging happens once at command construction (in the `build*Command`
34
+ * functions). Returns the same `Command` so call sites can chain:
35
+ *
36
+ * markMutation(profile.command("update").description(...).action(...));
37
+ *
38
+ * Future mutation surfaces (timesheet submit per #13, additional
39
+ * profile-domain updates per #74-76) MUST call this when they ship —
40
+ * forgetting to mark fires the read-no-op note instead of routing
41
+ * through the dry-run path. Lint / test coverage at the program level
42
+ * is the safety net for that contract.
43
+ */
44
+ export declare function markMutation(cmd: Command): Command;
45
+ /**
46
+ * True when `cmd` was previously tagged via {@link markMutation}. Used
47
+ * by the program's `preAction` hook to decide whether the `--dry-run`
48
+ * flag should route through the handler's dry-run path or fire the
49
+ * read-no-op stderr note.
50
+ *
51
+ * Returns `false` for any Commander Command that was not tagged —
52
+ * including mutations whose authors forgot to call `markMutation`. Such
53
+ * commands will silently fall into the read-no-op path; tests at the
54
+ * program level catch this regression.
55
+ */
56
+ export declare function isMutationCommand(cmd: Command): boolean;
57
+ /**
58
+ * Verbatim stderr text emitted by the program's `preAction` hook when
59
+ * `--dry-run` is set on a leaf that has NOT been tagged via {@link
60
+ * markMutation}. The exact wording is locked by the AC for issue #52
61
+ * ("`--dry-run` is a no-op for read commands") — pinning it as a
62
+ * constant lets tests assert against the same string the production
63
+ * code emits without duplicating it.
64
+ *
65
+ * The trailing newline is part of the constant so callers writing to
66
+ * stderr with `process.stderr.write` can pass it directly without
67
+ * appending `"\n"`.
68
+ */
69
+ export declare const DRY_RUN_NO_OP_STDERR_NOTE: "note: `--dry-run` is a no-op for read commands\n";
70
+ //# sourceMappingURL=dry-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dry-run.d.ts","sourceRoot":"","sources":["../../src/lib/dry-run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBzC;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAiBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGlD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEvD;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,EAAG,kDAA2D,CAAC"}
@@ -0,0 +1,114 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ /**
4
+ * Process-scoped holder for the global `--dry-run` flag (issue #52).
5
+ *
6
+ * Set once by the root program's `preAction` hook (see `program.ts`)
7
+ * before any sub-command's action handler runs; read by mutation
8
+ * handlers that need to route through the core layer's `dryRun` option
9
+ * to short-circuit before transport. Mirrors the pattern established by
10
+ * `cliConfigPath` in `lib/config-context.ts`: a module-scoped variable
11
+ * keeps each handler's signature focused on its domain (no `cmd:
12
+ * Command` parameter threading) while exposing a single place to test
13
+ * the captured value.
14
+ *
15
+ * Tests must call `resetCliDryRun()` in `beforeEach` to avoid bleeding
16
+ * state across cases — the module-scoped variable persists across
17
+ * Vitest's `vi.resetModules` only when the module under test is the
18
+ * one importing this file.
19
+ */
20
+ let cliDryRun = false;
21
+ /**
22
+ * Capture the global `--dry-run` value from the root program's
23
+ * `preAction` hook. Pass `false` when the flag was omitted (Commander's
24
+ * default for boolean Options is `undefined`, which the hook normalises
25
+ * to `false` before invoking this setter).
26
+ */
27
+ export function setCliDryRun(value) {
28
+ cliDryRun = value;
29
+ }
30
+ /**
31
+ * Read the captured `--dry-run` value. Returns `false` when the flag
32
+ * was not passed (the apply-path default).
33
+ *
34
+ * Mutation action handlers call this directly — when the leaf is marked
35
+ * as a mutation (see {@link markMutation}), the global flag has been
36
+ * captured and the handler is responsible for routing through the
37
+ * core's `dryRun` option.
38
+ */
39
+ export function getCliDryRun() {
40
+ return cliDryRun;
41
+ }
42
+ /**
43
+ * Reset the captured value. Tests call this in `beforeEach` to avoid
44
+ * bleeding state across cases. Not used in production — the program's
45
+ * `preAction` hook calls `setCliDryRun` once per invocation, so stale
46
+ * values are not possible at runtime.
47
+ */
48
+ export function resetCliDryRun() {
49
+ cliDryRun = false;
50
+ }
51
+ /**
52
+ * Symbol-keyed marker used by {@link markMutation} and {@link
53
+ * isMutationCommand} to tag Commander `Command` instances as mutation
54
+ * entry points. Symbol-keyed (rather than a string property) so the
55
+ * marker cannot collide with any future Commander internal field, and
56
+ * cannot be reached via accidental `for-in` iteration on the command.
57
+ *
58
+ * `Symbol.for` (the cross-realm registry) instead of a fresh `Symbol`
59
+ * so the same marker resolves identically across module boundaries —
60
+ * Vitest's module isolation occasionally re-evaluates this file in a
61
+ * fresh realm, and a non-registered symbol would silently lose the
62
+ * tag on Command instances built by the production program.
63
+ */
64
+ const MUTATION_MARKER = Symbol.for("ttctl.cli.command.isMutation");
65
+ /**
66
+ * Tag `cmd` as a mutation entry point. Mutation commands are responsible
67
+ * for routing the `--dry-run` flag through to the core layer's `dryRun`
68
+ * option; commands NOT tagged are treated as read-only / unsupported by
69
+ * the program's `preAction` hook (which emits a stderr no-op note when
70
+ * `--dry-run` is set on a non-mutation leaf).
71
+ *
72
+ * Tagging happens once at command construction (in the `build*Command`
73
+ * functions). Returns the same `Command` so call sites can chain:
74
+ *
75
+ * markMutation(profile.command("update").description(...).action(...));
76
+ *
77
+ * Future mutation surfaces (timesheet submit per #13, additional
78
+ * profile-domain updates per #74-76) MUST call this when they ship —
79
+ * forgetting to mark fires the read-no-op note instead of routing
80
+ * through the dry-run path. Lint / test coverage at the program level
81
+ * is the safety net for that contract.
82
+ */
83
+ export function markMutation(cmd) {
84
+ cmd[MUTATION_MARKER] = true;
85
+ return cmd;
86
+ }
87
+ /**
88
+ * True when `cmd` was previously tagged via {@link markMutation}. Used
89
+ * by the program's `preAction` hook to decide whether the `--dry-run`
90
+ * flag should route through the handler's dry-run path or fire the
91
+ * read-no-op stderr note.
92
+ *
93
+ * Returns `false` for any Commander Command that was not tagged —
94
+ * including mutations whose authors forgot to call `markMutation`. Such
95
+ * commands will silently fall into the read-no-op path; tests at the
96
+ * program level catch this regression.
97
+ */
98
+ export function isMutationCommand(cmd) {
99
+ return cmd[MUTATION_MARKER] === true;
100
+ }
101
+ /**
102
+ * Verbatim stderr text emitted by the program's `preAction` hook when
103
+ * `--dry-run` is set on a leaf that has NOT been tagged via {@link
104
+ * markMutation}. The exact wording is locked by the AC for issue #52
105
+ * ("`--dry-run` is a no-op for read commands") — pinning it as a
106
+ * constant lets tests assert against the same string the production
107
+ * code emits without duplicating it.
108
+ *
109
+ * The trailing newline is part of the constant so callers writing to
110
+ * stderr with `process.stderr.write` can pass it directly without
111
+ * appending `"\n"`.
112
+ */
113
+ export const DRY_RUN_NO_OP_STDERR_NOTE = "note: `--dry-run` is a no-op for read commands\n";
114
+ //# sourceMappingURL=dry-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dry-run.js","sourceRoot":"","sources":["../../src/lib/dry-run.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAIpC;;;;;;;;;;;;;;;;GAgBG;AACH,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,SAAS,GAAG,KAAK,CAAC;AACpB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc;IAC5B,SAAS,GAAG,KAAK,CAAC;AACpB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AAEnE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;IACtC,GAA0C,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACpE,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAY;IAC5C,OAAQ,GAA0C,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;AAC/E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,kDAA2D,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Per-command empty-state hint registry and detection helper for the
3
+ * `formatResult` empty-state wrapper (introduced #122; format names
4
+ * updated for the #126 reframe). The wrapper checks for empty
5
+ * collection input BEFORE per-format dispatch and emits a per-format
6
+ * empty payload — `[]` for `json`, prose with create-CTA for `pretty`,
7
+ * normal block-style rendering for `yaml`.
8
+ *
9
+ * This module is the single source of truth for the empty-state CTA
10
+ * wording across all `list` leaves; per-formatter `if (items.length ===
11
+ * 0) return "(no foo)"` branches in individual sub-domain formatters
12
+ * become production-unreachable once the call site opts into the
13
+ * wrapper via `OutputFormatters#empty`.
14
+ */
15
+ /**
16
+ * Per-command empty-state metadata. Looked up by canonical command path
17
+ * (e.g. `profile.skills.list`) when the wrapper fires.
18
+ *
19
+ * - `entityPlural`: noun for the "No <entity-plural> found." line
20
+ * (e.g., `"skills"`, `"portfolio items"`).
21
+ * - `addHint`: optional copy-pasteable command the user can run to
22
+ * create their first item (e.g., `"ttctl profile skills add <name>"`).
23
+ * Omitted for sub-domains where empty-state isn't user-resolvable
24
+ * (e.g., pending reviews are server-driven, not user-created).
25
+ */
26
+ export interface EmptyStateCta {
27
+ entityPlural: string;
28
+ addHint?: string;
29
+ }
30
+ /**
31
+ * Frozen registry mapping canonical command paths to their empty-state
32
+ * metadata. Keys MUST match the `command` value passed by the caller via
33
+ * `OutputFormatters#empty.command`.
34
+ *
35
+ * Extension policy: when adding a new `list` leaf, add a registry entry
36
+ * here AND wire the call site to pass `empty: { command: "<key>" }`.
37
+ * Missing entries fall through to a generic `"No items found."` line —
38
+ * surfaced but not silenced — so the wrapper degrades gracefully when a
39
+ * sub-domain ships before its registry entry.
40
+ */
41
+ export declare const EMPTY_STATE_CTAS: Readonly<Record<string, EmptyStateCta>>;
42
+ /**
43
+ * Render the empty-state prose line for a given command path. Returns
44
+ * `"No <entity-plural> found. Add one with: <addHint>"` when both
45
+ * `entityPlural` and `addHint` are registered; degrades to
46
+ * `"No <entity-plural> found."` when only the noun is registered; falls
47
+ * back to `"No items found."` when the command is unknown.
48
+ *
49
+ * Pure — directly unit-testable.
50
+ */
51
+ export declare function emptyStateProse(command: string): string;
52
+ /**
53
+ * Detect collection-shaped input that the empty-state wrapper should
54
+ * intercept. Returns `true` for both `[]` (current top-level list shape)
55
+ * and `{items: []}` (the future `{items, pageInfo?}` envelope reserved
56
+ * by the v0.4 reframe — see #121). Returns `false` for anything else,
57
+ * including non-collection objects, scalars, `null`, and `undefined`,
58
+ * so the wrapper never accidentally fires on a `show` payload.
59
+ *
60
+ * Pure — directly unit-testable.
61
+ */
62
+ export declare function isEmptyCollection(value: unknown): boolean;
63
+ //# sourceMappingURL=empty-state-cta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state-cta.d.ts","sourceRoot":"","sources":["../../src/lib/empty-state-cta.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CA+BnE,CAAC;AAEH;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYzD"}
@@ -0,0 +1,88 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ /**
4
+ * Frozen registry mapping canonical command paths to their empty-state
5
+ * metadata. Keys MUST match the `command` value passed by the caller via
6
+ * `OutputFormatters#empty.command`.
7
+ *
8
+ * Extension policy: when adding a new `list` leaf, add a registry entry
9
+ * here AND wire the call site to pass `empty: { command: "<key>" }`.
10
+ * Missing entries fall through to a generic `"No items found."` line —
11
+ * surfaced but not silenced — so the wrapper degrades gracefully when a
12
+ * sub-domain ships before its registry entry.
13
+ */
14
+ export const EMPTY_STATE_CTAS = Object.freeze({
15
+ "profile.skills.list": {
16
+ entityPlural: "skills",
17
+ addHint: "ttctl profile skills add <name>",
18
+ },
19
+ "profile.portfolio.list": {
20
+ entityPlural: "portfolio items",
21
+ addHint: "ttctl profile portfolio add",
22
+ },
23
+ "profile.industries.list": {
24
+ entityPlural: "industries",
25
+ addHint: "ttctl profile industries add <name>",
26
+ },
27
+ "profile.visas.list": {
28
+ entityPlural: "travel visas",
29
+ addHint: "ttctl profile visas add",
30
+ },
31
+ // Reviews are pending-review records the server creates when a profile
32
+ // section needs re-attestation; the user resolves them via `approve`,
33
+ // not by adding new ones — the empty case is a happy state, not a
34
+ // call-to-create.
35
+ "profile.reviews.list": {
36
+ entityPlural: "pending section reviews",
37
+ },
38
+ // Activity items (#15) are server-driven — applications, availability
39
+ // requests, interviews, and engagements all materialize when the
40
+ // recruiter / client side acts. Empty case is a happy state for new
41
+ // users; no `addHint` (no `apply` verb in TTCtl per project non-goals).
42
+ "applications.list": {
43
+ entityPlural: "activity items",
44
+ },
45
+ });
46
+ /**
47
+ * Render the empty-state prose line for a given command path. Returns
48
+ * `"No <entity-plural> found. Add one with: <addHint>"` when both
49
+ * `entityPlural` and `addHint` are registered; degrades to
50
+ * `"No <entity-plural> found."` when only the noun is registered; falls
51
+ * back to `"No items found."` when the command is unknown.
52
+ *
53
+ * Pure — directly unit-testable.
54
+ */
55
+ export function emptyStateProse(command) {
56
+ const cta = EMPTY_STATE_CTAS[command];
57
+ if (cta === undefined) {
58
+ return "No items found.";
59
+ }
60
+ if (cta.addHint === undefined) {
61
+ return `No ${cta.entityPlural} found.`;
62
+ }
63
+ return `No ${cta.entityPlural} found. Add one with: ${cta.addHint}`;
64
+ }
65
+ /**
66
+ * Detect collection-shaped input that the empty-state wrapper should
67
+ * intercept. Returns `true` for both `[]` (current top-level list shape)
68
+ * and `{items: []}` (the future `{items, pageInfo?}` envelope reserved
69
+ * by the v0.4 reframe — see #121). Returns `false` for anything else,
70
+ * including non-collection objects, scalars, `null`, and `undefined`,
71
+ * so the wrapper never accidentally fires on a `show` payload.
72
+ *
73
+ * Pure — directly unit-testable.
74
+ */
75
+ export function isEmptyCollection(value) {
76
+ if (Array.isArray(value)) {
77
+ return value.length === 0;
78
+ }
79
+ if (typeof value !== "object" || value === null) {
80
+ return false;
81
+ }
82
+ if (!Object.prototype.hasOwnProperty.call(value, "items")) {
83
+ return false;
84
+ }
85
+ const items = value.items;
86
+ return Array.isArray(items) && items.length === 0;
87
+ }
88
+ //# sourceMappingURL=empty-state-cta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state-cta.js","sourceRoot":"","sources":["../../src/lib/empty-state-cta.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAiCpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA4C,MAAM,CAAC,MAAM,CAAC;IACrF,qBAAqB,EAAE;QACrB,YAAY,EAAE,QAAQ;QACtB,OAAO,EAAE,iCAAiC;KAC3C;IACD,wBAAwB,EAAE;QACxB,YAAY,EAAE,iBAAiB;QAC/B,OAAO,EAAE,6BAA6B;KACvC;IACD,yBAAyB,EAAE;QACzB,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE,qCAAqC;KAC/C;IACD,oBAAoB,EAAE;QACpB,YAAY,EAAE,cAAc;QAC5B,OAAO,EAAE,yBAAyB;KACnC;IACD,uEAAuE;IACvE,sEAAsE;IACtE,kEAAkE;IAClE,kBAAkB;IAClB,sBAAsB,EAAE;QACtB,YAAY,EAAE,yBAAyB;KACxC;IACD,sEAAsE;IACtE,iEAAiE;IACjE,oEAAoE;IACpE,wEAAwE;IACxE,mBAAmB,EAAE;QACnB,YAAY,EAAE,gBAAgB;KAC/B;CACF,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,MAAM,GAAG,CAAC,YAAY,SAAS,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,GAAG,CAAC,YAAY,yBAAyB,GAAG,CAAC,OAAO,EAAE,CAAC;AACtE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAI,KAA4B,CAAC,KAAK,CAAC;IAClD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AACpD,CAAC"}