@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
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  Bring [Backlog](https://backlog.com/) to your command line.
4
4
 
5
- **Note:** This is not an officially supported Nulab product. It is maintained by volunteers.
6
-
7
5
  ## Install
8
6
 
9
7
  ```sh
@@ -34,6 +32,11 @@ See the [documentation site](https://nulab.github.io/bee) for the full command r
34
32
 
35
33
  See the [repository root README](https://github.com/nulab/bee) for development setup and contributing instructions.
36
34
 
35
+ ## Support
36
+
37
+ Bug reports, feature requests, and questions are handled via [GitHub Issues](https://github.com/nulab/bee/issues/new/choose).
38
+ You can write in English or Japanese.
39
+
37
40
  ## License
38
41
 
39
- MIT
42
+ This project is licensed under the [MIT License](https://github.com/nulab/bee/blob/main/LICENSE).
@@ -0,0 +1,69 @@
1
+ import { j as getActivitySummary, y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as ACTIVITY_LABELS } from "./activity-labels-CLFpxp8o.mjs";
3
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
4
+ import { a as parseArg, r as printTable, s as vInteger } from "./src-CP4YLIAh.mjs";
5
+ import { t as formatDate } from "./format-DHAR0n3J.mjs";
6
+ import { n as ENV_AUTH, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
7
+ import { S as space, c as count, f as maxId, m as minId, o as collectNum, u as json, v as order } from "./common-options-BuYWxYdO.mjs";
8
+ import consola from "consola";
9
+ import { getUserActivities } from "backlog-js";
10
+ import * as v from "valibot";
11
+ //#region src/commands/user/activities.ts
12
+ const activities = new BeeCommand("activities").summary("List user activities").description(`Results are ordered by most recent first. Use \`--activity-type\` to filter by type.
13
+
14
+ For activity type IDs, see:
15
+ https://developer.nulab.com/docs/backlog/api/2/get-user-recent-updates/#response-description`).argument("<user>", "User ID").option("--activity-type <id>", "Filter by activity type IDs (repeatable)", collectNum, []).addOption(count()).addOption(order()).addOption(minId()).addOption(maxId()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
16
+ {
17
+ description: "List user activities",
18
+ command: "bee user activities 12345"
19
+ },
20
+ {
21
+ description: "Show only issue-related activities",
22
+ command: "bee user activities 12345 --activity-type 1 --activity-type 2 --activity-type 3"
23
+ },
24
+ {
25
+ description: "Show last 50 activities",
26
+ command: "bee user activities 12345 --count 50"
27
+ },
28
+ {
29
+ description: "Output as JSON",
30
+ command: "bee user activities 12345 --json"
31
+ }
32
+ ]).action(async (user, opts) => {
33
+ const { client } = await getClient(opts.space);
34
+ const activityTypeId = opts.activityType;
35
+ const activityList = await getUserActivities(client, parseArg(vInteger, user, "user"), {
36
+ activityTypeId,
37
+ count: parseArg(v.optional(vInteger), opts.count, "--count"),
38
+ order: opts.order,
39
+ minId: parseArg(v.optional(vInteger), opts.minId, "--min-id"),
40
+ maxId: parseArg(v.optional(vInteger), opts.maxId, "--max-id")
41
+ });
42
+ outputResult(activityList, opts, (data) => {
43
+ if (data.length === 0) {
44
+ consola.info("No activities found.");
45
+ return;
46
+ }
47
+ const rows = data.map((activity) => [
48
+ {
49
+ header: "DATE",
50
+ value: formatDate(activity.created)
51
+ },
52
+ {
53
+ header: "TYPE",
54
+ value: ACTIVITY_LABELS[activity.type] ?? `Type ${activity.type}`
55
+ },
56
+ {
57
+ header: "PROJECT",
58
+ value: activity.project?.name ?? ""
59
+ },
60
+ {
61
+ header: "SUMMARY",
62
+ value: getActivitySummary(activity)
63
+ }
64
+ ]);
65
+ printTable(rows);
66
+ });
67
+ });
68
+ //#endregion
69
+ export { activities as default };
@@ -0,0 +1,72 @@
1
+ import { j as getActivitySummary, y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as ACTIVITY_LABELS } from "./activity-labels-CLFpxp8o.mjs";
3
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
4
+ import { a as parseArg, r as printTable, s as vInteger } from "./src-CP4YLIAh.mjs";
5
+ import { t as formatDate } from "./format-DHAR0n3J.mjs";
6
+ import { n as ENV_AUTH, r as ENV_PROJECT, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
7
+ import { E as resolveOptions, S as space, c as count, o as collectNum, u as json, v as order, y as project } from "./common-options-BuYWxYdO.mjs";
8
+ import consola from "consola";
9
+ import { getProjectActivities } from "backlog-js";
10
+ import * as v from "valibot";
11
+ //#region src/commands/project/activities.ts
12
+ const activities = new BeeCommand("activities").summary("List project activities").description(`Results are ordered by most recent first. Use \`--activity-type\` to filter by type.
13
+
14
+ For activity type IDs, see:
15
+ https://developer.nulab.com/docs/backlog/api/2/get-project-recent-updates/#response-description`).addOption(project()).option("--activity-type <id>", "Filter by activity type IDs (repeatable)", collectNum, []).addOption(count()).addOption(order()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
16
+ {
17
+ description: "List recent activities",
18
+ command: "bee project activities -p PROJECT_KEY"
19
+ },
20
+ {
21
+ description: "Show only issue-related activities",
22
+ command: "bee project activities -p PROJECT_KEY --activity-type 1 --activity-type 2 --activity-type 3"
23
+ },
24
+ {
25
+ description: "Show last 50 activities",
26
+ command: "bee project activities -p PROJECT_KEY --count 50"
27
+ },
28
+ {
29
+ description: "Output as JSON",
30
+ command: "bee project activities -p PROJECT_KEY --json"
31
+ }
32
+ ]).action(async (opts, cmd) => {
33
+ await resolveOptions(cmd);
34
+ const { client } = await getClient(opts.space);
35
+ const activityTypeId = opts.activityType;
36
+ const activityList = await getProjectActivities(client, opts.project, {
37
+ activityTypeId,
38
+ count: parseArg(v.optional(vInteger), opts.count, "--count"),
39
+ order: opts.order
40
+ });
41
+ const jsonArg = opts.json === true ? "" : opts.json;
42
+ outputResult(activityList, {
43
+ ...opts,
44
+ json: jsonArg
45
+ }, (data) => {
46
+ if (data.length === 0) {
47
+ consola.info("No activities found.");
48
+ return;
49
+ }
50
+ const rows = data.map((activity) => [
51
+ {
52
+ header: "DATE",
53
+ value: formatDate(activity.created)
54
+ },
55
+ {
56
+ header: "TYPE",
57
+ value: ACTIVITY_LABELS[activity.type] ?? `Type ${activity.type}`
58
+ },
59
+ {
60
+ header: "USER",
61
+ value: activity.createdUser?.name ?? "Unknown"
62
+ },
63
+ {
64
+ header: "SUMMARY",
65
+ value: getActivitySummary(activity)
66
+ }
67
+ ]);
68
+ printTable(rows);
69
+ });
70
+ });
71
+ //#endregion
72
+ export { activities as default };
@@ -0,0 +1,69 @@
1
+ import { j as getActivitySummary, y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as ACTIVITY_LABELS } from "./activity-labels-CLFpxp8o.mjs";
3
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
4
+ import { a as parseArg, r as printTable, s as vInteger } from "./src-CP4YLIAh.mjs";
5
+ import { t as formatDate } from "./format-DHAR0n3J.mjs";
6
+ import { n as ENV_AUTH, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
7
+ import { S as space, c as count, f as maxId, m as minId, o as collectNum, u as json, v as order } from "./common-options-BuYWxYdO.mjs";
8
+ import consola from "consola";
9
+ import { getSpaceActivities } from "backlog-js";
10
+ import * as v from "valibot";
11
+ //#region src/commands/space/activities.ts
12
+ const activities = new BeeCommand("activities").summary("List space activities").description(`Results are ordered by most recent first. Use \`--activity-type\` to filter by type.
13
+
14
+ For activity type IDs, see:
15
+ https://developer.nulab.com/docs/backlog/api/2/get-recent-updates/#response-description`).option("--activity-type <id>", "Filter by activity type IDs (repeatable)", collectNum, []).addOption(count()).addOption(order()).addOption(minId()).addOption(maxId()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
16
+ {
17
+ description: "List space activities",
18
+ command: "bee space activities"
19
+ },
20
+ {
21
+ description: "Show only issue-related activities",
22
+ command: "bee space activities --activity-type 1 --activity-type 2 --activity-type 3"
23
+ },
24
+ {
25
+ description: "Show last 50 activities",
26
+ command: "bee space activities --count 50"
27
+ },
28
+ {
29
+ description: "Output as JSON",
30
+ command: "bee space activities --json"
31
+ }
32
+ ]).action(async (opts) => {
33
+ const { client } = await getClient(opts.space);
34
+ const activityTypeId = opts.activityType;
35
+ const activityList = await getSpaceActivities(client, {
36
+ activityTypeId,
37
+ count: parseArg(v.optional(vInteger), opts.count, "--count"),
38
+ order: opts.order,
39
+ minId: parseArg(v.optional(vInteger), opts.minId, "--min-id"),
40
+ maxId: parseArg(v.optional(vInteger), opts.maxId, "--max-id")
41
+ });
42
+ outputResult(activityList, opts, (data) => {
43
+ if (data.length === 0) {
44
+ consola.info("No activities found.");
45
+ return;
46
+ }
47
+ const rows = data.map((activity) => [
48
+ {
49
+ header: "DATE",
50
+ value: formatDate(activity.created)
51
+ },
52
+ {
53
+ header: "TYPE",
54
+ value: ACTIVITY_LABELS[activity.type] ?? `Type ${activity.type}`
55
+ },
56
+ {
57
+ header: "PROJECT",
58
+ value: activity.project?.name ?? ""
59
+ },
60
+ {
61
+ header: "SUMMARY",
62
+ value: getActivitySummary(activity)
63
+ }
64
+ ]);
65
+ printTable(rows);
66
+ });
67
+ });
68
+ //#endregion
69
+ export { activities as default };
@@ -0,0 +1,34 @@
1
+ //#region ../../packages/backlog-utils/src/activity-labels.ts
2
+ const ACTIVITY_LABELS = {
3
+ 1: "Issue Created",
4
+ 2: "Issue Updated",
5
+ 3: "Issue Commented",
6
+ 4: "Issue Deleted",
7
+ 5: "Wiki Created",
8
+ 6: "Wiki Updated",
9
+ 7: "Wiki Deleted",
10
+ 8: "File Added",
11
+ 9: "File Updated",
12
+ 10: "File Deleted",
13
+ 11: "SVN Committed",
14
+ 12: "Git Pushed",
15
+ 13: "Git Repo Created",
16
+ 14: "Issue Multi-Updated",
17
+ 15: "Project User Added",
18
+ 16: "Project User Removed",
19
+ 17: "Notification Added",
20
+ 18: "Pull Request Added",
21
+ 19: "Pull Request Updated",
22
+ 20: "Pull Request Commented",
23
+ 21: "Pull Request Deleted",
24
+ 22: "Milestone Added",
25
+ 23: "Milestone Updated",
26
+ 24: "Milestone Deleted",
27
+ 25: "Project Team Added",
28
+ 26: "Project Team Deleted",
29
+ 34: "Status Deleted",
30
+ 35: "Issues Dates Updated",
31
+ 47: "Issue Multi-Created"
32
+ };
33
+ //#endregion
34
+ export { ACTIVITY_LABELS as t };
@@ -0,0 +1,55 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { a as parseArg, s as vInteger, u as UserError } from "./src-CP4YLIAh.mjs";
3
+ import { n as ENV_AUTH, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
4
+ import { S as space, l as issue } from "./common-options-BuYWxYdO.mjs";
5
+ import consola from "consola";
6
+ import { getIssue, postStar } from "backlog-js";
7
+ //#region src/commands/star/add.ts
8
+ const add = new BeeCommand("add").summary("Add a star").description(`Specify exactly one target: \`--issue\` (accepts key or ID), \`--comment\`, \`--wiki\`, or \`--pr-comment\`.`).addOption(issue()).option("--comment <number>", "Comment ID to star").option("--wiki <number>", "Wiki page ID to star").option("--pr-comment <number>", "Pull request comment ID to star").addOption(space()).envVars([...ENV_AUTH]).examples([
9
+ {
10
+ description: "Star an issue by key",
11
+ command: "bee star add --issue PROJECT-123"
12
+ },
13
+ {
14
+ description: "Star an issue by ID",
15
+ command: "bee star add --issue 12345"
16
+ },
17
+ {
18
+ description: "Star a comment",
19
+ command: "bee star add --comment 67890"
20
+ },
21
+ {
22
+ description: "Star a wiki page",
23
+ command: "bee star add --wiki 111"
24
+ },
25
+ {
26
+ description: "Star a pull request comment",
27
+ command: "bee star add --pr-comment 222"
28
+ }
29
+ ]).action(async (opts) => {
30
+ const flags = [
31
+ opts.issue,
32
+ opts.comment,
33
+ opts.wiki,
34
+ opts.prComment
35
+ ].filter((val) => val !== void 0);
36
+ if (flags.length === 0) throw new UserError("Exactly one of --issue, --comment, --wiki, or --pr-comment must be provided.");
37
+ if (flags.length > 1) throw new UserError("Only one of --issue, --comment, --wiki, or --pr-comment can be provided at a time.");
38
+ const { client } = await getClient(opts.space);
39
+ if (opts.issue) {
40
+ const issueId = (/^\d+$/.test(opts.issue) ? { id: parseArg(vInteger, opts.issue, "--issue") } : await getIssue(client, opts.issue)).id;
41
+ await postStar(client, { issueId });
42
+ consola.success(`Starred issue ${opts.issue}.`);
43
+ } else if (opts.comment) {
44
+ await postStar(client, { commentId: parseArg(vInteger, opts.comment, "--comment") });
45
+ consola.success(`Starred comment ${opts.comment}.`);
46
+ } else if (opts.wiki) {
47
+ await postStar(client, { wikiId: parseArg(vInteger, opts.wiki, "--wiki") });
48
+ consola.success(`Starred wiki ${opts.wiki}.`);
49
+ } else if (opts.prComment) {
50
+ await postStar(client, { pullRequestCommentId: parseArg(vInteger, opts.prComment, "--pr-comment") });
51
+ consola.success(`Starred pull request comment ${opts.prComment}.`);
52
+ }
53
+ });
54
+ //#endregion
55
+ export { add as default };
@@ -0,0 +1,26 @@
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, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { S as space, u as json } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { postWatchingListItem } from "backlog-js";
8
+ //#region src/commands/watching/add.ts
9
+ const add = new BeeCommand("add").summary("Add a watching item").description(`Subscribe to an issue to receive update notifications.`).requiredOption("--issue <key>", "Issue ID or issue key").option("--note <text>", "Note to attach to the watching item").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([{
10
+ description: "Watch an issue",
11
+ command: "bee watching add --issue PROJECT-123"
12
+ }, {
13
+ description: "Watch an issue with a note",
14
+ command: "bee watching add --issue PROJECT-123 --note \"Track progress\""
15
+ }]).action(async (opts) => {
16
+ const { client } = await getClient(opts.space);
17
+ const result = await postWatchingListItem(client, {
18
+ issueIdOrKey: opts.issue,
19
+ note: opts.note ?? ""
20
+ });
21
+ outputResult(result, opts, (data) => {
22
+ consola.success(`Added watching for issue ${data.issue.issueKey} (ID: ${data.id}).`);
23
+ });
24
+ });
25
+ //#endregion
26
+ export { add as default };
@@ -0,0 +1,26 @@
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, T as RequiredOption, u as json, y as project } from "./common-options-BuYWxYdO.mjs";
6
+ import consola from "consola";
7
+ import { postProjectUser } from "backlog-js";
8
+ //#region src/commands/project/add-user.ts
9
+ const addUser = new BeeCommand("add-user").summary("Add a user to a project").description(`Use \`bee project users\` to look up user IDs.`).addOption(project()).addOption(new RequiredOption("--user-id <id>", "User ID")).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([{
10
+ description: "Add a user to a project",
11
+ command: "bee project add-user -p PROJECT_KEY --user-id 12345"
12
+ }]).action(async (opts, cmd) => {
13
+ await resolveOptions(cmd);
14
+ const userId = parseArg(vInteger, opts.userId, "--user-id");
15
+ const { client } = await getClient(opts.space);
16
+ const user = await postProjectUser(client, opts.project, String(userId));
17
+ const jsonArg = opts.json === true ? "" : opts.json;
18
+ outputResult(user, {
19
+ ...opts,
20
+ json: jsonArg
21
+ }, (data) => {
22
+ consola.success(`Added user ${data.name} to project ${opts.project}.`);
23
+ });
24
+ });
25
+ //#endregion
26
+ export { addUser as default };
@@ -0,0 +1,143 @@
1
+ import { y as getClient } from "./src-CTD9-bSB.mjs";
2
+ import { t as outputResult } from "./output-DBvfyU1J.mjs";
3
+ import { o as vFiniteNumber, u as UserError } from "./src-CP4YLIAh.mjs";
4
+ import { n as ENV_AUTH, t as BeeCommand } from "./bee-command-v0qvZeth.mjs";
5
+ import { S as space, a as collect } from "./common-options-BuYWxYdO.mjs";
6
+ import { text } from "node:stream/consumers";
7
+ import * as v from "valibot";
8
+ import { readFile } from "node:fs/promises";
9
+ //#region src/commands/api.ts
10
+ const api = new BeeCommand("api").summary("Make an authenticated API request").description(`The endpoint is a Backlog API path (e.g. \`users/myself\`). A leading \`/api/v2/\` prefix is stripped automatically.
11
+
12
+ \`-f\` infers types (number, boolean, string); \`-F\` always sends strings. A value is only inferred as a number when the number prints back identically, so \`1.0\`, \`0042\` and \`0x10\` stay strings. Repeated keys become arrays. Append \`[]\` for a single-element array (e.g. \`-f projectId[]=12345\`).
13
+
14
+ If a \`-f\` value starts with \`@\`, the rest of the value is interpreted as a filename to read the value from. Pass \`-\` to read from standard input (e.g. \`-f 'key=@-'\`). File and stdin content is always sent as a string, without type inference.
15
+
16
+ For GET, fields are query parameters. For POST/PUT/PATCH/DELETE, fields are the request body.`).argument("<endpoint>", "API endpoint path").option("-X, --method <method>", "HTTP method", "GET").option("-f, --field <key=value>", "Add a typed parameter (use \"@<path>\" or \"@-\" to read value from file or stdin)", collect, []).option("-F, --raw-field <key=value>", "Add a string parameter (key=value, repeatable)", collect, []).option("--json [fields]", "Output as JSON (optionally filter by field names, comma-separated)").option("--silent", "Do not print the response body").addOption(space()).envVars([...ENV_AUTH]).examples([
17
+ {
18
+ description: "Get your user profile",
19
+ command: "bee api users/myself"
20
+ },
21
+ {
22
+ description: "List issues in a project",
23
+ command: "bee api issues -f 'projectId[]=12345' -f count=5"
24
+ },
25
+ {
26
+ description: "Filter by multiple statuses",
27
+ command: "bee api issues -f 'projectId[]=12345' -f statusId=1 -f statusId=2"
28
+ },
29
+ {
30
+ description: "Create an issue",
31
+ command: "bee api issues -X POST -f projectId=12345 -f summary=\"Test issue\" -f issueTypeId=1 -f priorityId=3"
32
+ },
33
+ {
34
+ description: "Set a field value from a file",
35
+ command: "bee api issues/PROJECT-1 -X PATCH -f 'description=@desc.md'"
36
+ },
37
+ {
38
+ description: "Pipe content from stdin",
39
+ command: "echo 'Hello' | bee api issues/PROJECT-1/comments -X POST -f 'content=@-'"
40
+ },
41
+ {
42
+ description: "Select specific fields",
43
+ command: "bee api users/myself --json id,name,mailAddress"
44
+ }
45
+ ]).action(async (endpoint, opts) => {
46
+ const { client } = await getClient(opts.space);
47
+ const method = opts.method.toUpperCase();
48
+ const normalizedEndpoint = normalizeEndpoint(endpoint);
49
+ const params = await buildParams(opts.field, opts.rawField);
50
+ const data = await makeRequest(client, method, normalizedEndpoint, params);
51
+ if (opts.silent) return;
52
+ const jsonVal = typeof opts.json === "string" ? opts.json : "";
53
+ outputResult(data, { json: jsonVal }, () => {});
54
+ });
55
+ /**
56
+ * Normalize API endpoint path for backlog-js client methods.
57
+ * backlog-js prepends `restBaseURL` (which includes `/api/v2`), so
58
+ * the path passed to `client.get()` etc. must be relative (e.g. `users/myself`).
59
+ * This function strips a leading `/api/v2/` prefix if the user supplied one.
60
+ */
61
+ const normalizeEndpoint = (endpoint) => {
62
+ return endpoint.replace(/^\/?(api\/v2\/?)/, "");
63
+ };
64
+ /**
65
+ * Read a field value from a file (`@path`) or stdin (`@-`) reference.
66
+ * The content is sent as-is: no trimming, and no type inference — gh's
67
+ * magicFieldValue does the same. Inferring here would coerce content that
68
+ * only looks numeric: a file holding just a newline became `0`, because
69
+ * Number("\n") is 0.
70
+ */
71
+ const readFieldValue = async (ref) => {
72
+ if (ref === "-") return text(process.stdin);
73
+ if (ref === "") throw new UserError("Invalid file reference: \"@\". Provide a file path after @ or use @- for stdin.");
74
+ try {
75
+ return await readFile(ref, "utf8");
76
+ } catch (error) {
77
+ const { code } = error;
78
+ if (code === "ENOENT") throw new UserError(`File not found: ${ref}`);
79
+ if (code === "EISDIR") throw new UserError(`Expected a file but got a directory: ${ref}`);
80
+ throw error;
81
+ }
82
+ };
83
+ /**
84
+ * Build params object from --field and --raw-field values.
85
+ * --field infers types (number, boolean, string) and supports @file references.
86
+ * --raw-field always uses literal strings.
87
+ * When the same key appears multiple times, values are collected into an array.
88
+ */
89
+ const buildParams = async (fields, rawFields) => {
90
+ const params = {};
91
+ const addParam = (rawKey, value) => {
92
+ const isArray = rawKey.endsWith("[]");
93
+ const key = isArray ? rawKey.slice(0, -2) : rawKey;
94
+ const existing = params[key];
95
+ if (existing === void 0) params[key] = isArray ? [value] : value;
96
+ else params[key] = Array.isArray(existing) ? [...existing, value] : [existing, value];
97
+ };
98
+ for (const pair of fields) {
99
+ const eqIndex = pair.indexOf("=");
100
+ if (eqIndex === -1) throw new UserError(`Invalid field format: "${pair}". Expected key=value.`);
101
+ const rawValue = pair.slice(eqIndex + 1);
102
+ const value = rawValue.startsWith("@") ? await readFieldValue(rawValue.slice(1)) : inferType(rawValue);
103
+ addParam(pair.slice(0, eqIndex), value);
104
+ }
105
+ for (const pair of rawFields) {
106
+ const eqIndex = pair.indexOf("=");
107
+ if (eqIndex === -1) throw new UserError(`Invalid field format: "${pair}". Expected key=value.`);
108
+ addParam(pair.slice(0, eqIndex), pair.slice(eqIndex + 1));
109
+ }
110
+ return params;
111
+ };
112
+ /**
113
+ * Infer type from a string value.
114
+ *
115
+ * A value is only treated as a number when it survives the round trip through
116
+ * one — `String(Number(value)) === value`. Everything `Number()` accepts is a
117
+ * wider set than the spellings it can reproduce, and the difference is sent
118
+ * over the wire: `1.0` became `1`, `0042` became `42`, `0x10` became `16`, and
119
+ * an id past 2^53 lost digits, all without an error. Since the API takes
120
+ * form-encoded params, an inferred number is stringified again anyway, so
121
+ * declining to infer here costs nothing and keeps the value intact.
122
+ */
123
+ const inferType = (value) => {
124
+ if (value === "true") return true;
125
+ if (value === "false") return false;
126
+ if (value !== "") {
127
+ const result = v.safeParse(vFiniteNumber, value);
128
+ if (result.success && String(result.output) === value) return result.output;
129
+ }
130
+ return value;
131
+ };
132
+ const makeRequest = async (client, method, endpoint, params) => {
133
+ switch (method) {
134
+ case "GET": return client.get(endpoint, params);
135
+ case "POST": return client.post(endpoint, params);
136
+ case "PUT": return client.put(endpoint, params);
137
+ case "PATCH": return client.patch(endpoint, params);
138
+ case "DELETE": return client.delete(endpoint, params);
139
+ default: throw new UserError(`Unsupported HTTP method: ${method}`);
140
+ }
141
+ };
142
+ //#endregion
143
+ export { api as default };
@@ -0,0 +1,50 @@
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 formatSize, 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, u as json } from "./common-options-BuYWxYdO.mjs";
7
+ import consola from "consola";
8
+ import { getDocument } from "backlog-js";
9
+ //#region src/commands/document/attachments.ts
10
+ const attachments = new BeeCommand("attachments").summary("List document attachments").description(`Shows file name, size, creator, and creation date.`).argument("<document>", "Document ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([{
11
+ description: "List attachments",
12
+ command: "bee document attachments 12345"
13
+ }, {
14
+ description: "Output as JSON",
15
+ command: "bee document attachments 12345 --json"
16
+ }]).action(async (document, opts) => {
17
+ const { client } = await getClient(opts.space);
18
+ const doc = await getDocument(client, document);
19
+ outputResult(doc.attachments, opts, (data) => {
20
+ if (data.length === 0) {
21
+ consola.info("No attachments found.");
22
+ return;
23
+ }
24
+ const rows = data.map((file) => [
25
+ {
26
+ header: "ID",
27
+ value: String(file.id)
28
+ },
29
+ {
30
+ header: "NAME",
31
+ value: file.name
32
+ },
33
+ {
34
+ header: "SIZE",
35
+ value: formatSize(file.size)
36
+ },
37
+ {
38
+ header: "CREATED BY",
39
+ value: file.createdUser?.name ?? "Unknown"
40
+ },
41
+ {
42
+ header: "CREATED",
43
+ value: formatDate(file.created)
44
+ }
45
+ ]);
46
+ printTable(rows);
47
+ });
48
+ });
49
+ //#endregion
50
+ export { attachments as default };
@@ -0,0 +1,50 @@
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 formatSize, 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, u as json } from "./common-options-BuYWxYdO.mjs";
7
+ import consola from "consola";
8
+ import { getIssueAttachments } from "backlog-js";
9
+ //#region src/commands/issue/attachments.ts
10
+ const attachments = new BeeCommand("attachments").summary("List issue attachments").description(`Shows file name, size, creator, and creation date.`).argument("<issue>", "Issue ID or issue key").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([{
11
+ description: "List attachments",
12
+ command: "bee issue attachments PROJECT-123"
13
+ }, {
14
+ description: "Output as JSON",
15
+ command: "bee issue attachments PROJECT-123 --json"
16
+ }]).action(async (issue, opts) => {
17
+ const { client } = await getClient(opts.space);
18
+ const files = await getIssueAttachments(client, issue);
19
+ outputResult(files, opts, (data) => {
20
+ if (data.length === 0) {
21
+ consola.info("No attachments found.");
22
+ return;
23
+ }
24
+ const rows = data.map((file) => [
25
+ {
26
+ header: "ID",
27
+ value: String(file.id)
28
+ },
29
+ {
30
+ header: "NAME",
31
+ value: file.name
32
+ },
33
+ {
34
+ header: "SIZE",
35
+ value: formatSize(file.size)
36
+ },
37
+ {
38
+ header: "CREATED BY",
39
+ value: file.createdUser?.name ?? "Unknown"
40
+ },
41
+ {
42
+ header: "CREATED",
43
+ value: formatDate(file.created)
44
+ }
45
+ ]);
46
+ printTable(rows);
47
+ });
48
+ });
49
+ //#endregion
50
+ export { attachments as default };
@@ -0,0 +1,46 @@
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, u as json } from "./common-options-BuYWxYdO.mjs";
7
+ import consola from "consola";
8
+ import { getWikisAttachments } from "backlog-js";
9
+ //#region src/commands/wiki/attachments.ts
10
+ const attachments = new BeeCommand("attachments").summary("List wiki page attachments").description(`Shows file name, size, creator, and creation date.`).argument("<wiki>", "Wiki page ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([{
11
+ description: "List wiki attachments",
12
+ command: "bee wiki attachments 12345"
13
+ }, {
14
+ description: "Output as JSON",
15
+ command: "bee wiki attachments 12345 --json"
16
+ }]).action(async (wiki, opts) => {
17
+ const { client } = await getClient(opts.space);
18
+ const files = await getWikisAttachments(client, parseArg(vInteger, wiki, "wiki"));
19
+ outputResult(files, opts, (data) => {
20
+ if (data.length === 0) {
21
+ consola.info("No attachments found.");
22
+ return;
23
+ }
24
+ const rows = data.map((f) => [
25
+ {
26
+ header: "NAME",
27
+ value: f.name
28
+ },
29
+ {
30
+ header: "SIZE",
31
+ value: String(f.size)
32
+ },
33
+ {
34
+ header: "CREATED BY",
35
+ value: f.createdUser.name
36
+ },
37
+ {
38
+ header: "CREATED",
39
+ value: formatDate(f.created)
40
+ }
41
+ ]);
42
+ printTable(rows);
43
+ });
44
+ });
45
+ //#endregion
46
+ export { attachments as default };