@nulab/bee 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/README.md +6 -3
  2. package/dist/activities-BPTHt_MD.mjs +69 -0
  3. package/dist/activities-CRiEq51-.mjs +72 -0
  4. package/dist/activities-DyOMqdsM.mjs +69 -0
  5. package/dist/activity-labels-CLFpxp8o.mjs +34 -0
  6. package/dist/add-Br-_TLRp.mjs +55 -0
  7. package/dist/add-CTmmy2t9.mjs +26 -0
  8. package/dist/add-user-BVWFcbH7.mjs +26 -0
  9. package/dist/api-kJR0fRPw.mjs +143 -0
  10. package/dist/attachments-CnL8t9tK.mjs +50 -0
  11. package/dist/attachments-D8IoJjYE.mjs +50 -0
  12. package/dist/attachments-DfgEkAY2.mjs +46 -0
  13. package/dist/auth-5TJGBPxi.mjs +13 -0
  14. package/dist/bee-command-v0qvZeth.mjs +57 -0
  15. package/dist/browse-vgF6nz7X.mjs +304 -0
  16. package/dist/category-BZ7XdVgx.mjs +11 -0
  17. package/dist/clone-DAWVtVbZ.mjs +43 -0
  18. package/dist/close-cTyZPv77.mjs +37 -0
  19. package/dist/comment-CkYJYFrF.mjs +115 -0
  20. package/dist/comment-DzRBQNv8.mjs +102 -0
  21. package/dist/comments-SnOZ-EUJ.mjs +47 -0
  22. package/dist/common-options-BuYWxYdO.mjs +45 -0
  23. package/dist/completion-yfcnEl7k.mjs +113 -0
  24. package/dist/count-BI7ld4k5.mjs +50 -0
  25. package/dist/count-Bw0mVlxC.mjs +40 -0
  26. package/dist/count-CH_LN4k6.mjs +51 -0
  27. package/dist/count-CHzDiMV3.mjs +25 -0
  28. package/dist/count-DvmYzPD_.mjs +46 -0
  29. package/dist/create-BHjwacOk.mjs +47 -0
  30. package/dist/create-BXWATibN.mjs +41 -0
  31. package/dist/create-BtLVFmbR.mjs +29 -0
  32. package/dist/create-CoF2bahH.mjs +29 -0
  33. package/dist/create-DhAOhro9.mjs +60 -0
  34. package/dist/create-DtMLv7Wq.mjs +26 -0
  35. package/dist/create-PtahSFdG.mjs +66 -0
  36. package/dist/create-Y4vo2zwX.mjs +44 -0
  37. package/dist/create-vwRKZ3Lm.mjs +31 -0
  38. package/dist/dashboard-CYYU5Yii.mjs +97 -0
  39. package/dist/delete-BCAPHs-g.mjs +25 -0
  40. package/dist/delete-BHNt5SWa.mjs +24 -0
  41. package/dist/delete-BlmanW0H.mjs +25 -0
  42. package/dist/delete-Bxk14ntp.mjs +24 -0
  43. package/dist/delete-C05oMZEW.mjs +24 -0
  44. package/dist/delete-CMwkcSiA.mjs +25 -0
  45. package/dist/delete-CTeH7nzL.mjs +29 -0
  46. package/dist/delete-D2yDBhZc.mjs +24 -0
  47. package/dist/delete-HMOfvtv3.mjs +25 -0
  48. package/dist/document-CiIzSyoS.mjs +13 -0
  49. package/dist/edit-BBvSbt0m.mjs +22 -0
  50. package/dist/edit-CN1gdpjd.mjs +37 -0
  51. package/dist/edit-C_KbKopB.mjs +36 -0
  52. package/dist/edit-D5Z45NVj.mjs +27 -0
  53. package/dist/edit-DKQw-XXP.mjs +27 -0
  54. package/dist/edit-DRxr4r-r.mjs +60 -0
  55. package/dist/edit-DxsP-aPX.mjs +43 -0
  56. package/dist/edit-Otc7XHU7.mjs +52 -0
  57. package/dist/format-DHAR0n3J.mjs +9 -0
  58. package/dist/history-DpjqxFkX.mjs +55 -0
  59. package/dist/index.mjs +35 -207
  60. package/dist/issue-BRzJy3k1.mjs +18 -0
  61. package/dist/issue-type-Byzh4yLx.mjs +11 -0
  62. package/dist/list-B3A5SDEm.mjs +35 -0
  63. package/dist/list-BMKaJoe_.mjs +64 -0
  64. package/dist/list-BOMbpS4m.mjs +46 -0
  65. package/dist/list-BmZ_JbLB.mjs +104 -0
  66. package/dist/list-BpUUxxwQ.mjs +46 -0
  67. package/dist/list-CgIebllW.mjs +94 -0
  68. package/dist/list-D0Z__0nw.mjs +42 -0
  69. package/dist/list-D3FkO9gb.mjs +56 -0
  70. package/dist/list-D7WLdHvX.mjs +42 -0
  71. package/dist/list-DAr3urtu.mjs +53 -0
  72. package/dist/list-DqpWd9aR.mjs +59 -0
  73. package/dist/list-VO_PbRjC.mjs +50 -0
  74. package/dist/list-b6ByzUFt.mjs +79 -0
  75. package/dist/list-jpQ28gU2.mjs +56 -0
  76. package/dist/list-y93EXyDj.mjs +42 -0
  77. package/dist/login-BnJYzdR3.mjs +228 -0
  78. package/dist/logout-YMnSRLLF.mjs +56 -0
  79. package/dist/me-CLPAe7X2.mjs +36 -0
  80. package/dist/milestone-Dc3alfp9.mjs +11 -0
  81. package/dist/notification-CsOuC8Uk.mjs +11 -0
  82. package/dist/output-DBvfyU1J.mjs +39 -0
  83. package/dist/pr-BBe07JUp.mjs +15 -0
  84. package/dist/project-Dilo1T5e.mjs +16 -0
  85. package/dist/read-BS2G4sNq.mjs +17 -0
  86. package/dist/read-CyCASx6U.mjs +17 -0
  87. package/dist/read-all-CjgMJ2to.mjs +16 -0
  88. package/dist/refresh-DDU2ZLnc.mjs +54 -0
  89. package/dist/registry-B0ZQfBD5.mjs +35 -0
  90. package/dist/registry-RATsKPUm.mjs +2 -0
  91. package/dist/remove-BSDJvkVJ.mjs +17 -0
  92. package/dist/remove-user-CShNCvf8.mjs +26 -0
  93. package/dist/reopen-BIRhcmsI.mjs +28 -0
  94. package/dist/repo-B2K8y0mD.mjs +10 -0
  95. package/dist/role-labels-CLA2wmjO.mjs +11 -0
  96. package/dist/space-BgZeUqoH.mjs +6 -0
  97. package/dist/{shared/bee.B3N0WBdU.mjs → src-BWaxjrq_.mjs} +143 -176
  98. package/dist/src-CP4YLIAh.mjs +1008 -0
  99. package/dist/src-CTD9-bSB.mjs +22760 -0
  100. package/dist/star-Sgb-e2CQ.mjs +11 -0
  101. package/dist/status-BkFMW8Jh.mjs +53 -0
  102. package/dist/status-CaGqMXh7.mjs +64 -0
  103. package/dist/status-DDFyQrRZ.mjs +11 -0
  104. package/dist/status-nI4Dpcoo.mjs +58 -0
  105. package/dist/stdin-C-vjNi9T.mjs +17 -0
  106. package/dist/switch-CMLfVGDN.mjs +34 -0
  107. package/dist/tags-DuMJZyBL.mjs +29 -0
  108. package/dist/team-DfQn8Tf5.mjs +6 -0
  109. package/dist/token-BmkUX9vc.mjs +28 -0
  110. package/dist/tree-CozBqPbN.mjs +46 -0
  111. package/dist/user-DMyFmoP3.mjs +11 -0
  112. package/dist/users-BSGqsGSy.mjs +51 -0
  113. package/dist/view-Bj99sk7O.mjs +48 -0
  114. package/dist/view-Bs8o0c7i.mjs +36 -0
  115. package/dist/view-C1ECwTMN.mjs +54 -0
  116. package/dist/view-COBYBfu7.mjs +38 -0
  117. package/dist/view-CZHT-HiE.mjs +36 -0
  118. package/dist/view-D1RuQJV6.mjs +76 -0
  119. package/dist/view-DBO75WzR.mjs +54 -0
  120. package/dist/view-DJHrnN8j.mjs +62 -0
  121. package/dist/view-DLx6qQt9.mjs +51 -0
  122. package/dist/watching-D22YYxOT.mjs +12 -0
  123. package/dist/wiki-B-DQUuIX.mjs +16 -0
  124. package/package.json +12 -7
  125. package/dist/chunks/activities.mjs +0 -77
  126. package/dist/chunks/activities2.mjs +0 -77
  127. package/dist/chunks/activities3.mjs +0 -77
  128. package/dist/chunks/add-user.mjs +0 -40
  129. package/dist/chunks/add.mjs +0 -65
  130. package/dist/chunks/add2.mjs +0 -41
  131. package/dist/chunks/api.mjs +0 -176
  132. package/dist/chunks/attachments.mjs +0 -49
  133. package/dist/chunks/attachments2.mjs +0 -49
  134. package/dist/chunks/attachments3.mjs +0 -50
  135. package/dist/chunks/browse.mjs +0 -271
  136. package/dist/chunks/clone.mjs +0 -62
  137. package/dist/chunks/close.mjs +0 -52
  138. package/dist/chunks/comment.mjs +0 -127
  139. package/dist/chunks/comment2.mjs +0 -113
  140. package/dist/chunks/comments.mjs +0 -59
  141. package/dist/chunks/completion.mjs +0 -118
  142. package/dist/chunks/count.mjs +0 -70
  143. package/dist/chunks/count2.mjs +0 -71
  144. package/dist/chunks/count3.mjs +0 -61
  145. package/dist/chunks/count4.mjs +0 -37
  146. package/dist/chunks/count5.mjs +0 -54
  147. package/dist/chunks/create.mjs +0 -62
  148. package/dist/chunks/create2.mjs +0 -90
  149. package/dist/chunks/create3.mjs +0 -66
  150. package/dist/chunks/create4.mjs +0 -76
  151. package/dist/chunks/create5.mjs +0 -58
  152. package/dist/chunks/create6.mjs +0 -39
  153. package/dist/chunks/create7.mjs +0 -47
  154. package/dist/chunks/create8.mjs +0 -51
  155. package/dist/chunks/create9.mjs +0 -51
  156. package/dist/chunks/dashboard.mjs +0 -86
  157. package/dist/chunks/delete.mjs +0 -50
  158. package/dist/chunks/delete2.mjs +0 -48
  159. package/dist/chunks/delete3.mjs +0 -48
  160. package/dist/chunks/delete4.mjs +0 -51
  161. package/dist/chunks/delete5.mjs +0 -52
  162. package/dist/chunks/delete6.mjs +0 -52
  163. package/dist/chunks/delete7.mjs +0 -64
  164. package/dist/chunks/delete8.mjs +0 -55
  165. package/dist/chunks/delete9.mjs +0 -50
  166. package/dist/chunks/edit.mjs +0 -58
  167. package/dist/chunks/edit2.mjs +0 -80
  168. package/dist/chunks/edit3.mjs +0 -67
  169. package/dist/chunks/edit4.mjs +0 -53
  170. package/dist/chunks/edit5.mjs +0 -45
  171. package/dist/chunks/edit6.mjs +0 -56
  172. package/dist/chunks/edit7.mjs +0 -52
  173. package/dist/chunks/edit8.mjs +0 -52
  174. package/dist/chunks/history.mjs +0 -58
  175. package/dist/chunks/index.mjs +0 -15
  176. package/dist/chunks/index10.mjs +0 -18
  177. package/dist/chunks/index11.mjs +0 -13
  178. package/dist/chunks/index12.mjs +0 -13
  179. package/dist/chunks/index13.mjs +0 -13
  180. package/dist/chunks/index14.mjs +0 -8
  181. package/dist/chunks/index15.mjs +0 -13
  182. package/dist/chunks/index16.mjs +0 -13
  183. package/dist/chunks/index17.mjs +0 -14
  184. package/dist/chunks/index2.mjs +0 -18
  185. package/dist/chunks/index3.mjs +0 -20
  186. package/dist/chunks/index4.mjs +0 -15
  187. package/dist/chunks/index5.mjs +0 -13
  188. package/dist/chunks/index6.mjs +0 -17
  189. package/dist/chunks/index7.mjs +0 -8
  190. package/dist/chunks/index8.mjs +0 -8
  191. package/dist/chunks/index9.mjs +0 -13
  192. package/dist/chunks/list.mjs +0 -54
  193. package/dist/chunks/list10.mjs +0 -46
  194. package/dist/chunks/list11.mjs +0 -51
  195. package/dist/chunks/list12.mjs +0 -47
  196. package/dist/chunks/list13.mjs +0 -47
  197. package/dist/chunks/list14.mjs +0 -56
  198. package/dist/chunks/list15.mjs +0 -48
  199. package/dist/chunks/list2.mjs +0 -105
  200. package/dist/chunks/list3.mjs +0 -87
  201. package/dist/chunks/list4.mjs +0 -81
  202. package/dist/chunks/list5.mjs +0 -79
  203. package/dist/chunks/list6.mjs +0 -47
  204. package/dist/chunks/list7.mjs +0 -50
  205. package/dist/chunks/list8.mjs +0 -48
  206. package/dist/chunks/list9.mjs +0 -55
  207. package/dist/chunks/login.mjs +0 -220
  208. package/dist/chunks/logout.mjs +0 -72
  209. package/dist/chunks/me.mjs +0 -50
  210. package/dist/chunks/read-all.mjs +0 -31
  211. package/dist/chunks/read.mjs +0 -31
  212. package/dist/chunks/read2.mjs +0 -29
  213. package/dist/chunks/refresh.mjs +0 -78
  214. package/dist/chunks/remove-user.mjs +0 -40
  215. package/dist/chunks/remove.mjs +0 -29
  216. package/dist/chunks/reopen.mjs +0 -44
  217. package/dist/chunks/status.mjs +0 -61
  218. package/dist/chunks/status2.mjs +0 -63
  219. package/dist/chunks/status3.mjs +0 -68
  220. package/dist/chunks/switch.mjs +0 -51
  221. package/dist/chunks/tags.mjs +0 -43
  222. package/dist/chunks/token.mjs +0 -38
  223. package/dist/chunks/tree.mjs +0 -63
  224. package/dist/chunks/users.mjs +0 -50
  225. package/dist/chunks/view.mjs +0 -60
  226. package/dist/chunks/view2.mjs +0 -96
  227. package/dist/chunks/view3.mjs +0 -70
  228. package/dist/chunks/view4.mjs +0 -72
  229. package/dist/chunks/view5.mjs +0 -63
  230. package/dist/chunks/view6.mjs +0 -54
  231. package/dist/chunks/view7.mjs +0 -50
  232. package/dist/chunks/view8.mjs +0 -63
  233. package/dist/chunks/view9.mjs +0 -50
  234. package/dist/shared/bee.BImw1HZl.mjs +0 -28
  235. package/dist/shared/bee.BTBGpv4K.mjs +0 -34
  236. package/dist/shared/bee.BXiuAfjJ.mjs +0 -10
  237. package/dist/shared/bee.BYqxm3yG.mjs +0 -24
  238. package/dist/shared/bee.Btmq3TXs.mjs +0 -19
  239. package/dist/shared/bee.C--ZWPxf.mjs +0 -14
  240. package/dist/shared/bee.C4p7W8_P.mjs +0 -18
  241. package/dist/shared/bee.CirccSk2.mjs +0 -51
  242. package/dist/shared/bee.CktwmH8R.mjs +0 -25
  243. package/dist/shared/bee.CzKcWSES.mjs +0 -42
  244. package/dist/shared/bee.DFnSWb6q.mjs +0 -396
  245. package/dist/shared/bee.DessOtkV.mjs +0 -132
  246. package/dist/shared/bee.DfqnFet4.mjs +0 -49
  247. package/dist/shared/bee.DoTvz3uW.mjs +0 -13
  248. package/dist/shared/bee.G4d7izLe.mjs +0 -14
  249. package/dist/shared/bee.KteAW2rM.mjs +0 -73
  250. package/dist/shared/bee.PF8hrVKn.mjs +0 -27
  251. package/dist/shared/bee.a05kNWpn.mjs +0 -32
  252. package/dist/shared/bee.n5MYN4a6.mjs +0 -12
  253. package/dist/shared/bee.x-FvgDW2.mjs +0 -37660
@@ -0,0 +1,27 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { a as parseArg, s as vInteger } from "./src-CP4YLIAh.mjs";
4
+ import { n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { E as resolveOptions, S as space, u as json, y as project } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { patchProjectStatus } from "backlog-js";
8
+ //#region src/commands/status/edit.ts
9
+ const edit = new BeeCommand("edit").summary("Edit a status").description(`Only specified fields are updated; others remain unchanged.`).argument("<status>", "Status ID").addOption(project()).option("-n, --name <value>", "New name of the status").option("--color <value>", "Change display color {#ea2c00|#e87758|#e07b9a|#868cb7|#3b9dbd|#4caf93|#b0be3c|#eda62a|#f42858|#393939}").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([{
10
+ description: "Rename a status",
11
+ command: "bee status edit 12345 -p PROJECT -n \"New Name\""
12
+ }, {
13
+ description: "Change status color",
14
+ command: "bee status edit 12345 -p PROJECT --color \"#e30000\""
15
+ }]).action(async (status, opts, cmd) => {
16
+ await resolveOptions(cmd);
17
+ const { client } = await getClient(opts.space);
18
+ const result = await patchProjectStatus(client, opts.project, parseArg(vInteger, status, "status"), {
19
+ name: opts.name,
20
+ color: opts.color
21
+ });
22
+ outputResult(result, opts, (data) => {
23
+ consola.success(`Updated status ${data.name} (ID: ${data.id})`);
24
+ });
25
+ });
26
+ //#endregion
27
+ export { edit as default };
@@ -0,0 +1,27 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { a as parseArg, s as vInteger } from "./src-CP4YLIAh.mjs";
4
+ import { n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { E as resolveOptions, S as space, u as json, y as project } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { patchIssueType } from "backlog-js";
8
+ //#region src/commands/issue-type/edit.ts
9
+ const edit = new BeeCommand("edit").summary("Edit an issue type").description(`Only specified fields are updated; others remain unchanged.`).argument("<issueType>", "Issue type ID").addOption(project()).option("-n, --name <value>", "New name of the issue type").option("--color <value>", "Change display color {#e30000|#990000|#934981|#814fbc|#2779ca|#007e9a|#7ea800|#ff9200|#ff3265|#666665}").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([{
10
+ description: "Rename an issue type",
11
+ command: "bee issue-type edit 12345 -p PROJECT -n \"New Name\""
12
+ }, {
13
+ description: "Change issue type color",
14
+ command: "bee issue-type edit 12345 -p PROJECT --color \"#e30000\""
15
+ }]).action(async (issueType, opts, cmd) => {
16
+ await resolveOptions(cmd);
17
+ const { client } = await getClient(opts.space);
18
+ const result = await patchIssueType(client, opts.project, parseArg(vInteger, issueType, "issueType"), {
19
+ name: opts.name,
20
+ color: opts.color
21
+ });
22
+ outputResult(result, opts, (data) => {
23
+ consola.success(`Updated issue type ${data.name} (ID: ${data.id})`);
24
+ });
25
+ });
26
+ //#endregion
27
+ export { edit as default };
@@ -0,0 +1,60 @@
1
+ import { O as PRIORITY_NAMES, S as resolveUserId, k as PriorityId, y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { a as parseArg, o as vFiniteNumber, s as vInteger } from "./src-CP4YLIAh.mjs";
4
+ import { n as ENV_AUTH, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { C as version, S as space, g as notify, i as category, p as milestone, r as attachment, s as comment, u as json } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { patchIssue } from "backlog-js";
8
+ import * as v from "valibot";
9
+ //#region src/commands/issue/edit.ts
10
+ const edit = new BeeCommand("edit").summary("Edit an issue").description(`Only specified fields are updated; others remain unchanged.`).argument("<issue>", "Issue ID or issue key").option("-t, --title <text>", "New title of the issue").option("-d, --description <text>", "New description of the issue").option("-S, --status <id>", "New status ID").option("-P, --priority <name>", `Change priority`).option("-T, --type <id>", "New issue type ID").option("--assignee <id>", "New assignee user ID. Use @me for yourself.").addOption(category()).addOption(version()).addOption(milestone()).option("--resolution <id>", "Resolution ID").option("--parent-issue <id>", "New parent issue ID").option("--start-date <date>", "New start date").option("--due-date <date>", "New due date").option("--estimated-hours <n>", "New estimated hours").option("--actual-hours <n>", "New actual hours").addOption(comment()).addOption(notify()).addOption(attachment()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
11
+ {
12
+ description: "Update issue title",
13
+ command: "bee issue edit PROJECT-123 -t \"New title\""
14
+ },
15
+ {
16
+ description: "Change assignee and priority",
17
+ command: "bee issue edit PROJECT-123 --assignee 12345 --priority high"
18
+ },
19
+ {
20
+ description: "Add a comment with the update",
21
+ command: "bee issue edit PROJECT-123 -t \"New title\" --comment \"Updated title\""
22
+ }
23
+ ]).action(async (issue, opts) => {
24
+ const { client } = await getClient(opts.space);
25
+ const categoryId = opts.category ?? [];
26
+ const versionId = opts.version ?? [];
27
+ const milestoneId = opts.milestone ?? [];
28
+ const notifiedUserId = opts.notify ?? [];
29
+ const attachmentId = opts.attachment ?? [];
30
+ let priorityId;
31
+ if (opts.priority) {
32
+ priorityId = PriorityId[opts.priority.toLowerCase()];
33
+ if (priorityId === void 0) throw new Error(`Unknown priority "${opts.priority}". Valid values: ${PRIORITY_NAMES.join(", ")}`);
34
+ }
35
+ const issueData = await patchIssue(client, issue, {
36
+ summary: opts.title,
37
+ description: opts.description,
38
+ statusId: parseArg(v.optional(vInteger), opts.status, "--status"),
39
+ priorityId,
40
+ issueTypeId: parseArg(v.optional(vInteger), opts.type, "--type"),
41
+ assigneeId: opts.assignee ? await resolveUserId(client, opts.assignee) : void 0,
42
+ categoryId,
43
+ versionId,
44
+ milestoneId,
45
+ resolutionId: parseArg(v.optional(vInteger), opts.resolution, "--resolution"),
46
+ parentIssueId: parseArg(v.optional(vInteger), opts.parentIssue, "--parent-issue"),
47
+ startDate: opts.startDate,
48
+ dueDate: opts.dueDate,
49
+ estimatedHours: parseArg(v.optional(vFiniteNumber), opts.estimatedHours, "--estimated-hours"),
50
+ actualHours: parseArg(v.optional(vFiniteNumber), opts.actualHours, "--actual-hours"),
51
+ comment: opts.comment,
52
+ notifiedUserId,
53
+ attachmentId
54
+ });
55
+ outputResult(issueData, opts, (data) => {
56
+ consola.success(`Updated issue ${data.issueKey}: ${data.summary}`);
57
+ });
58
+ });
59
+ //#endregion
60
+ export { edit as default };
@@ -0,0 +1,43 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import "./src-CP4YLIAh.mjs";
4
+ import { n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { E as resolveOptions, S as space, u as json, y as project } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { patchProject } from "backlog-js";
8
+ //#region src/commands/project/edit.ts
9
+ const edit = new BeeCommand("edit").summary("Edit a project").description(`Only specified fields are updated; others remain unchanged.`).addOption(project()).option("-n, --name <name>", "New name of the project").option("-k, --key <key>", "New key of the project").option("--chart-enabled", "Change whether the chart is enabled").option("--subtasking-enabled", "Change whether subtasking is enabled").option("--project-leader-can-edit-project-leader", "Change whether project administrators can manage each other").option("--text-formatting-rule <rule>", "Change text formatting rule").option("--archived", "Change whether the project is archived").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
10
+ {
11
+ description: "Rename a project",
12
+ command: "bee project edit -p PROJECT_KEY --name \"New Name\""
13
+ },
14
+ {
15
+ description: "Archive a project",
16
+ command: "bee project edit -p PROJECT_KEY --archived"
17
+ },
18
+ {
19
+ description: "Change formatting rule to markdown",
20
+ command: "bee project edit -p PROJECT_KEY --text-formatting-rule markdown"
21
+ }
22
+ ]).action(async (opts, cmd) => {
23
+ await resolveOptions(cmd);
24
+ const { client } = await getClient(opts.space);
25
+ const projectData = await patchProject(client, opts.project, {
26
+ name: opts.name,
27
+ key: opts.key,
28
+ chartEnabled: opts.chartEnabled,
29
+ subtaskingEnabled: opts.subtaskingEnabled,
30
+ projectLeaderCanEditProjectLeader: opts.projectLeaderCanEditProjectLeader,
31
+ textFormattingRule: opts.textFormattingRule,
32
+ archived: opts.archived
33
+ });
34
+ const jsonArg = opts.json === true ? "" : opts.json;
35
+ outputResult(projectData, {
36
+ ...opts,
37
+ json: jsonArg
38
+ }, (data) => {
39
+ consola.success(`Updated project ${data.projectKey}: ${data.name}`);
40
+ });
41
+ });
42
+ //#endregion
43
+ export { edit as default };
@@ -0,0 +1,52 @@
1
+ import { S as resolveUserId, y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { a as parseArg, s as vInteger } from "./src-CP4YLIAh.mjs";
4
+ import { i as ENV_REPO, n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { E as resolveOptions, S as space, g as notify, s as comment, u as json, x as repo, y as project } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { getIssue, patchPullRequest } from "backlog-js";
8
+ import * as v from "valibot";
9
+ //#region src/commands/pr/edit.ts
10
+ const edit = new BeeCommand("edit").summary("Edit a pull request").description(`Only specified fields are updated; others remain unchanged.`).argument("<number>", "Pull request number").addOption(project()).addOption(repo()).option("-t, --title <text>", "New title of the pull request").option("-b, --body <text>", "New description of the pull request").option("--assignee <id>", "New assignee user ID. Use @me for yourself.").option("--issue <key>", "New related issue ID or issue key").addOption(comment()).addOption(notify()).addOption(json()).addOption(space()).envVars([
11
+ ...ENV_AUTH,
12
+ ENV_PROJECT,
13
+ ENV_REPO
14
+ ]).examples([
15
+ {
16
+ description: "Update pull request title",
17
+ command: "bee pr edit 42 -p PROJECT -R repo -t \"New title\""
18
+ },
19
+ {
20
+ description: "Change assignee",
21
+ command: "bee pr edit 42 -p PROJECT -R repo --assignee 12345"
22
+ },
23
+ {
24
+ description: "Add a comment with the update",
25
+ command: "bee pr edit 42 -p PROJECT -R repo -t \"New title\" --comment \"Updated title\""
26
+ }
27
+ ]).action(async (number, opts, cmd) => {
28
+ await resolveOptions(cmd);
29
+ const { client } = await getClient(opts.space);
30
+ const prNumber = parseArg(vInteger, number, "number");
31
+ const notifiedUserId = opts.notify ?? [];
32
+ let issueId;
33
+ if (opts.issue) {
34
+ const parsed = v.safeParse(vInteger, opts.issue);
35
+ if (parsed.success) issueId = parsed.output;
36
+ else issueId = (await getIssue(client, opts.issue)).id;
37
+ }
38
+ const pullRequest = await patchPullRequest(client, opts.project, opts.repo, prNumber, {
39
+ summary: opts.title,
40
+ description: opts.body,
41
+ issueId,
42
+ assigneeId: opts.assignee ? await resolveUserId(client, opts.assignee) : void 0,
43
+ comment: opts.comment ?? void 0,
44
+ notifiedUserId
45
+ });
46
+ const json = opts.json === true ? "" : opts.json;
47
+ outputResult(pullRequest, { json }, (data) => {
48
+ consola.success(`Updated pull request #${data.number}: ${data.summary}`);
49
+ });
50
+ });
51
+ //#endregion
52
+ export { edit as default };
@@ -0,0 +1,9 @@
1
+ //#region ../../packages/cli-utils/src/format.ts
2
+ const formatDate = (dateStr) => dateStr.slice(0, 10);
3
+ const formatSize = (bytes) => {
4
+ if (bytes < 1024) return `${bytes} B`;
5
+ if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)} KB`;
6
+ return `${(bytes / 1048576).toFixed(1)} MB`;
7
+ };
8
+ //#endregion
9
+ export { formatSize as n, formatDate as t };
@@ -0,0 +1,55 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { a as parseArg, r as printTable, s as vInteger } from "./src-CP4YLIAh.mjs";
4
+ import { t as formatDate } from "./format-DHAR0n3J.mjs";
5
+ import { n as ENV_AUTH, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
6
+ import { S as space, c as count, f as maxId, m as minId, u as json, v as order } from "./common-options-BuYWxYdO.mjs";
7
+ import consola from "consola";
8
+ import { getWikisHistory } from "backlog-js";
9
+ import * as v from "valibot";
10
+ //#region src/commands/wiki/history.ts
11
+ const history = new BeeCommand("history").summary("View wiki page history").description(`Shows version number, updater, and update date for each revision.`).argument("<wiki>", "Wiki page ID").addOption(minId()).addOption(maxId()).addOption(count()).addOption(order()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
12
+ {
13
+ description: "View wiki page history",
14
+ command: "bee wiki history 12345"
15
+ },
16
+ {
17
+ description: "View history in ascending order",
18
+ command: "bee wiki history 12345 --order asc"
19
+ },
20
+ {
21
+ description: "Output as JSON",
22
+ command: "bee wiki history 12345 --json"
23
+ }
24
+ ]).action(async (wiki, opts) => {
25
+ const { client } = await getClient(opts.space);
26
+ const histories = await getWikisHistory(client, parseArg(vInteger, wiki, "wiki"), {
27
+ minId: parseArg(v.optional(vInteger), opts.minId, "--min-id"),
28
+ maxId: parseArg(v.optional(vInteger), opts.maxId, "--max-id"),
29
+ count: parseArg(v.optional(vInteger), opts.count, "--count"),
30
+ order: opts.order
31
+ });
32
+ outputResult(histories, opts, (data) => {
33
+ if (data.length === 0) {
34
+ consola.info("No history found.");
35
+ return;
36
+ }
37
+ const rows = data.map((h) => [
38
+ {
39
+ header: "VERSION",
40
+ value: String(h.version)
41
+ },
42
+ {
43
+ header: "UPDATED BY",
44
+ value: h.createdUser.name
45
+ },
46
+ {
47
+ header: "UPDATED",
48
+ value: formatDate(h.created)
49
+ }
50
+ ]);
51
+ printTable(rows);
52
+ });
53
+ });
54
+ //#endregion
55
+ export { history as default };
package/dist/index.mjs CHANGED
@@ -1,211 +1,39 @@
1
- import consola, { LogLevels } from 'consola';
2
- import 'node:stream/consumers';
3
- import { ValiError, flatten } from 'valibot';
4
- import { U as UserError } from './shared/bee.BYqxm3yG.mjs';
5
- import 'backlog-js';
6
- import 'node:fs';
7
- import 'node:path';
8
- import 'node:os';
9
- import './shared/bee.BImw1HZl.mjs';
10
- import 'node:http';
11
- import 'open';
12
- import 'node:child_process';
13
- import { u as undiciExports } from './shared/bee.x-FvgDW2.mjs';
14
- import { B as BeeCommand } from './shared/bee.KteAW2rM.mjs';
15
- import { CommanderError } from 'commander';
16
- import 'node:module';
17
- import 'consola/utils';
18
-
19
- const errorCodeNames = {
20
- 1: "InternalError",
21
- 2: "LicenceError",
22
- 3: "LicenceExpiredError",
23
- 4: "AccessDeniedError",
24
- 5: "UnauthorizedOperationError",
25
- 6: "NoResourceError",
26
- 7: "InvalidRequestError",
27
- 8: "SpaceOverCapacityError",
28
- 9: "ResourceOverflowError",
29
- 10: "TooLargeFileError",
30
- 11: "AuthenticationError",
31
- 12: "RequiredMFAError",
32
- 13: "TooManyRequestsError"
33
- };
34
- const isBacklogErrorDetail = (value) => typeof value === "object" && value !== null && typeof value.message === "string" && typeof value.code === "number" && typeof value.moreInfo === "string";
35
- const isBacklogErrorResponse = (value) => typeof value === "object" && value !== null && Array.isArray(value.errors) && value.errors.length > 0 && value.errors.every(isBacklogErrorDetail);
36
- const formatBacklogError = (response) => response.errors.map((e) => {
37
- const name = errorCodeNames[e.code] ?? "UnknownError";
38
- const info = e.moreInfo ? ` (${e.moreInfo})` : "";
39
- return `${name}: ${e.message}${info}`;
40
- });
41
- const extractBacklogErrorBody = (error) => {
42
- if (error instanceof Error && "_body" in error && "_name" in error) {
43
- const record = error;
44
- if (typeof record._name === "string" && ["BacklogApiError", "BacklogAuthError"].includes(record._name)) {
45
- return record._body;
46
- }
47
- }
48
- return error;
49
- };
50
- const extractDebugDetails = (error) => {
51
- if (!(error instanceof Error)) {
52
- return {};
53
- }
54
- const record = error;
55
- return {
56
- url: typeof record._url === "string" ? record._url : void 0,
57
- status: typeof record._status === "number" ? record._status : void 0
58
- };
59
- };
60
- const handleBacklogApiError = (error, options) => {
61
- const errorBody = extractBacklogErrorBody(error);
62
- if (!isBacklogErrorResponse(errorBody)) {
63
- return false;
64
- }
65
- if (options.json) {
66
- process.stderr.write(`${JSON.stringify(errorBody)}
67
- `);
68
- return true;
69
- }
70
- for (const line of formatBacklogError(errorBody)) {
71
- consola.error(line);
72
- }
73
- const details = extractDebugDetails(error);
74
- if (details.url) {
75
- consola.debug(`Request URL: ${details.url}`);
76
- }
77
- if (details.status !== void 0) {
78
- consola.debug(`HTTP status: ${details.status}`);
79
- }
80
- return true;
81
- };
82
-
83
- const handleValidationError = (error) => {
84
- if (!(error instanceof ValiError)) {
85
- return false;
86
- }
87
- consola.error("API response validation failed.");
88
- const flat = flatten(error.issues);
89
- consola.debug("Validation details:");
90
- if (flat.root) {
91
- consola.debug(` (root): ${flat.root.join(", ")}`);
92
- }
93
- if (flat.nested) {
94
- for (const [field, errors] of Object.entries(flat.nested)) {
95
- consola.debug(` ${field}: ${errors?.join(", ")}`);
96
- }
97
- }
98
- if (flat.other) {
99
- consola.debug(` (other): ${flat.other.join(", ")}`);
100
- }
101
- consola.debug("Raw error:", error);
102
- return true;
103
- };
104
-
105
- const maskSensitiveParams = (url) => url.replaceAll(/([?&])(apiKey)=[^&]*/gi, "$1$2=***");
106
- const formatPath = (path) => {
107
- try {
108
- return decodeURIComponent(maskSensitiveParams(path));
109
- } catch {
110
- return maskSensitiveParams(path);
111
- }
112
- };
113
- const createLoggingInterceptor = () => {
114
- let originLogged = false;
115
- return (dispatch) => (opts, handler) => {
116
- const origin = opts.origin?.toString() ?? "";
117
- if (!originLogged && origin) {
118
- consola.debug(`API host: ${origin}`);
119
- originLogged = true;
120
- }
121
- const method = opts.method ?? "UNKNOWN";
122
- const path = formatPath(opts.path ?? "");
123
- const start = performance.now();
124
- consola.debug(`\u2192 ${method} ${path}`);
125
- return dispatch(opts, {
126
- onRequestStart(controller, context) {
127
- handler.onRequestStart?.(controller, context);
128
- },
129
- onRequestUpgrade(controller, statusCode, headers, socket) {
130
- handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
131
- },
132
- onResponseStart(controller, statusCode, headers, statusMessage) {
133
- const elapsed = Math.round(performance.now() - start);
134
- consola.debug(`\u2190 ${statusCode} ${method} ${path} (${elapsed}ms)`);
135
- handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
136
- },
137
- onResponseData(controller, data) {
138
- handler.onResponseData?.(controller, data);
139
- },
140
- onResponseEnd(controller, trailers) {
141
- handler.onResponseEnd?.(controller, trailers);
142
- },
143
- onResponseError(controller, err) {
144
- const elapsed = Math.round(performance.now() - start);
145
- consola.debug(`\u2717 ${method} ${path} (${elapsed}ms)`);
146
- handler.onResponseError?.(controller, err);
147
- }
148
- });
149
- };
150
- };
151
-
152
- const installHttpDispatcher = () => {
153
- const agent = new undiciExports.EnvHttpProxyAgent().compose(createLoggingInterceptor());
154
- undiciExports.setGlobalDispatcher(agent);
155
- };
156
-
1
+ import { M as handleBacklogApiError, t as installHttpDispatcher } from "./src-CTD9-bSB.mjs";
2
+ import { t as handleValidationError, u as UserError } from "./src-CP4YLIAh.mjs";
3
+ import { t as loadCommands } from "./registry-B0ZQfBD5.mjs";
4
+ import { t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import consola, { LogLevels } from "consola";
6
+ import { CommanderError } from "commander";
7
+ //#region src/lib/error.ts
157
8
  const handleError = (error) => {
158
- if (error instanceof CommanderError) {
159
- if (error.exitCode === 0) {
160
- return;
161
- }
162
- process.exit(error.exitCode);
163
- }
164
- const showStack = consola.level >= LogLevels.debug;
165
- const useJson = process.argv.includes("--json") || !process.stdout.isTTY;
166
- if (error instanceof UserError) {
167
- consola.error(showStack ? error : error.message);
168
- } else if (!handleBacklogApiError(error, { json: useJson }) && !handleValidationError(error)) {
169
- consola.error(error);
170
- }
171
- process.exit(1);
172
- };
173
-
174
- const version = "1.1.0";
175
- const description = "Bring Backlog to your command line";
176
- const pkg = {
177
- version: version,
178
- description: description};
179
-
9
+ if (error instanceof CommanderError) {
10
+ if (error.exitCode === 0) return;
11
+ process.exit(error.exitCode);
12
+ }
13
+ const showStack = consola.level >= LogLevels.debug;
14
+ const useJson = process.argv.includes("--json") || !process.stdout.isTTY;
15
+ if (error instanceof UserError) consola.error(showStack ? error : error.message);
16
+ else if (!handleBacklogApiError(error, { json: useJson }) && !handleValidationError(error)) consola.error(error);
17
+ process.exit(1);
18
+ };
19
+ //#endregion
20
+ //#region package.json
21
+ var version = "1.1.2";
22
+ var description = "Bring Backlog to your command line";
23
+ //#endregion
24
+ //#region src/index.ts
180
25
  consola.options.formatOptions.date = false;
181
26
  installHttpDispatcher();
182
- const program = new BeeCommand("bee").version(pkg.version).description(pkg.description);
183
- await program.addCommands([
184
- import('./chunks/index.mjs'),
185
- import('./chunks/index2.mjs'),
186
- import('./chunks/index3.mjs'),
187
- import('./chunks/index4.mjs'),
188
- import('./chunks/index5.mjs'),
189
- import('./chunks/index6.mjs'),
190
- import('./chunks/index7.mjs'),
191
- import('./chunks/index8.mjs'),
192
- import('./chunks/index9.mjs'),
193
- import('./chunks/index10.mjs'),
194
- import('./chunks/index11.mjs'),
195
- import('./chunks/index12.mjs'),
196
- import('./chunks/index13.mjs'),
197
- import('./chunks/index14.mjs'),
198
- import('./chunks/index15.mjs'),
199
- import('./chunks/index16.mjs'),
200
- import('./chunks/index17.mjs'),
201
- import('./chunks/dashboard.mjs'),
202
- import('./chunks/browse.mjs'),
203
- import('./chunks/api.mjs'),
204
- import('./chunks/completion.mjs')
205
- ]);
27
+ const program = new BeeCommand("bee").version(version).description(description ?? "");
206
28
  program.exitOverride();
207
- try {
208
- await program.parseAsync();
209
- } catch (error) {
210
- handleError(error);
211
- }
29
+ const main = async () => {
30
+ try {
31
+ await program.addCommands(loadCommands());
32
+ await program.parseAsync();
33
+ } catch (error) {
34
+ handleError(error);
35
+ }
36
+ };
37
+ main();
38
+ //#endregion
39
+ export {};
@@ -0,0 +1,18 @@
1
+ import { t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
2
+ //#region src/commands/issue/index.ts
3
+ const issue = new BeeCommand("issue").summary("Manage Backlog issues");
4
+ await issue.addCommands([
5
+ import("./list-BmZ_JbLB.mjs"),
6
+ import("./view-D1RuQJV6.mjs"),
7
+ import("./status-BkFMW8Jh.mjs"),
8
+ import("./create-PtahSFdG.mjs"),
9
+ import("./edit-DRxr4r-r.mjs"),
10
+ import("./close-cTyZPv77.mjs"),
11
+ import("./reopen-BIRhcmsI.mjs"),
12
+ import("./attachments-D8IoJjYE.mjs"),
13
+ import("./comment-CkYJYFrF.mjs"),
14
+ import("./count-CH_LN4k6.mjs"),
15
+ import("./delete-Bxk14ntp.mjs")
16
+ ]);
17
+ //#endregion
18
+ export { issue as default };
@@ -0,0 +1,11 @@
1
+ import { t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
2
+ //#region src/commands/issue-type/index.ts
3
+ const issueType = new BeeCommand("issue-type").summary("Manage project issue types");
4
+ await issueType.addCommands([
5
+ import("./list-D0Z__0nw.mjs"),
6
+ import("./create-CoF2bahH.mjs"),
7
+ import("./edit-DKQw-XXP.mjs"),
8
+ import("./delete-BlmanW0H.mjs")
9
+ ]);
10
+ //#endregion
11
+ export { issueType as default };
@@ -0,0 +1,35 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { r as printTable } from "./src-CP4YLIAh.mjs";
4
+ import { n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { E as resolveOptions, S as space, u as json, y as project } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { getCategories } from "backlog-js";
8
+ //#region src/commands/category/list.ts
9
+ const list = new BeeCommand("list").summary("List categories").description(`Categories help organize issues by grouping them into logical areas.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([{
10
+ description: "List all categories in a project",
11
+ command: "bee category list -p PROJECT"
12
+ }, {
13
+ description: "Output as JSON",
14
+ command: "bee category list -p PROJECT --json"
15
+ }]).action(async (opts, cmd) => {
16
+ await resolveOptions(cmd);
17
+ const { client } = await getClient(opts.space);
18
+ const categories = await getCategories(client, opts.project);
19
+ outputResult(categories, opts, (data) => {
20
+ if (data.length === 0) {
21
+ consola.info("No categories found.");
22
+ return;
23
+ }
24
+ const rows = data.map((c) => [{
25
+ header: "ID",
26
+ value: String(c.id)
27
+ }, {
28
+ header: "NAME",
29
+ value: c.name
30
+ }]);
31
+ printTable(rows);
32
+ });
33
+ });
34
+ //#endregion
35
+ export { list as default };
@@ -0,0 +1,64 @@
1
+ import { C as resolveProjectIds, y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { a as parseArg, i as splitArg, r as printTable, s as vInteger } from "./src-CP4YLIAh.mjs";
4
+ import { t as formatDate } from "./format-DHAR0n3J.mjs";
5
+ import { n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
6
+ import { E as resolveOptions, S as space, _ as offset, c as count, d as keyword, u as json, v as order, y as project } from "./common-options-BuYWxYdO.mjs";
7
+ import consola from "consola";
8
+ import { getDocuments } from "backlog-js";
9
+ import * as v from "valibot";
10
+ //#region src/commands/document/list.ts
11
+ const list = new BeeCommand("list").summary("List documents").description(`Use \`--keyword\` to search within document titles and content.`).addOption(project()).addOption(keyword()).option("--sort <field>", "Sort field {created|updated}").addOption(order()).addOption(count()).addOption(offset()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
12
+ {
13
+ description: "List documents in a project",
14
+ command: "bee document list -p PROJECT"
15
+ },
16
+ {
17
+ description: "Search documents by keyword",
18
+ command: "bee document list -p PROJECT -k \"meeting notes\""
19
+ },
20
+ {
21
+ description: "Output as JSON",
22
+ command: "bee document list -p PROJECT --json"
23
+ }
24
+ ]).action(async (opts, cmd) => {
25
+ await resolveOptions(cmd);
26
+ const { client } = await getClient(opts.space);
27
+ const projectId = await resolveProjectIds(client, splitArg(opts.project, v.string()));
28
+ const documents = await getDocuments(client, {
29
+ projectId,
30
+ keyword: opts.keyword,
31
+ sort: opts.sort,
32
+ order: opts.order,
33
+ count: parseArg(v.optional(vInteger), opts.count, "--count"),
34
+ offset: parseArg(v.optional(vInteger), opts.offset, "--offset") ?? 0
35
+ });
36
+ const json = opts.json === true ? "" : opts.json;
37
+ outputResult(documents, { json }, (data) => {
38
+ if (data.length === 0) {
39
+ consola.info("No documents found.");
40
+ return;
41
+ }
42
+ const rows = data.map((doc) => [
43
+ {
44
+ header: "ID",
45
+ value: doc.id
46
+ },
47
+ {
48
+ header: "EMOJI",
49
+ value: doc.emoji ?? ""
50
+ },
51
+ {
52
+ header: "TITLE",
53
+ value: doc.title
54
+ },
55
+ {
56
+ header: "UPDATED",
57
+ value: formatDate(doc.updated)
58
+ }
59
+ ]);
60
+ printTable(rows);
61
+ });
62
+ });
63
+ //#endregion
64
+ export { list as default };