@nulab/bee 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/activities-BPTHt_MD.mjs +69 -0
  2. package/dist/activities-CRiEq51-.mjs +72 -0
  3. package/dist/activities-DyOMqdsM.mjs +69 -0
  4. package/dist/activity-labels-CLFpxp8o.mjs +34 -0
  5. package/dist/add-Br-_TLRp.mjs +55 -0
  6. package/dist/add-CTmmy2t9.mjs +26 -0
  7. package/dist/add-user-BVWFcbH7.mjs +26 -0
  8. package/dist/api-DhA8avDD.mjs +134 -0
  9. package/dist/attachments-CnL8t9tK.mjs +50 -0
  10. package/dist/attachments-D8IoJjYE.mjs +50 -0
  11. package/dist/attachments-DfgEkAY2.mjs +46 -0
  12. package/dist/auth-5TJGBPxi.mjs +13 -0
  13. package/dist/bee-command-v0qvZeth.mjs +57 -0
  14. package/dist/browse-vgF6nz7X.mjs +304 -0
  15. package/dist/category-BZ7XdVgx.mjs +11 -0
  16. package/dist/clone-DAWVtVbZ.mjs +43 -0
  17. package/dist/close-cTyZPv77.mjs +37 -0
  18. package/dist/comment-CkYJYFrF.mjs +115 -0
  19. package/dist/comment-DzRBQNv8.mjs +102 -0
  20. package/dist/comments-SnOZ-EUJ.mjs +47 -0
  21. package/dist/common-options-BuYWxYdO.mjs +45 -0
  22. package/dist/completion-yX2VOQSl.mjs +113 -0
  23. package/dist/count-BI7ld4k5.mjs +50 -0
  24. package/dist/count-Bw0mVlxC.mjs +40 -0
  25. package/dist/count-CH_LN4k6.mjs +51 -0
  26. package/dist/count-CHzDiMV3.mjs +25 -0
  27. package/dist/count-DvmYzPD_.mjs +46 -0
  28. package/dist/create-BHjwacOk.mjs +47 -0
  29. package/dist/create-BXWATibN.mjs +41 -0
  30. package/dist/create-BtLVFmbR.mjs +29 -0
  31. package/dist/create-CoF2bahH.mjs +29 -0
  32. package/dist/create-DhAOhro9.mjs +60 -0
  33. package/dist/create-DtMLv7Wq.mjs +26 -0
  34. package/dist/create-PtahSFdG.mjs +66 -0
  35. package/dist/create-Y4vo2zwX.mjs +44 -0
  36. package/dist/create-vwRKZ3Lm.mjs +31 -0
  37. package/dist/dashboard-CYYU5Yii.mjs +97 -0
  38. package/dist/delete-BCAPHs-g.mjs +25 -0
  39. package/dist/delete-BHNt5SWa.mjs +24 -0
  40. package/dist/delete-BlmanW0H.mjs +25 -0
  41. package/dist/delete-Bxk14ntp.mjs +24 -0
  42. package/dist/delete-C05oMZEW.mjs +24 -0
  43. package/dist/delete-CMwkcSiA.mjs +25 -0
  44. package/dist/delete-CTeH7nzL.mjs +29 -0
  45. package/dist/delete-D2yDBhZc.mjs +24 -0
  46. package/dist/delete-HMOfvtv3.mjs +25 -0
  47. package/dist/document-vTiqLew9.mjs +14 -0
  48. package/dist/edit-BBvSbt0m.mjs +22 -0
  49. package/dist/edit-BfCZ2Abi.mjs +50 -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/file-DwPTUKOI.mjs +17 -0
  58. package/dist/format-DHAR0n3J.mjs +9 -0
  59. package/dist/history-DpjqxFkX.mjs +55 -0
  60. package/dist/index.mjs +33 -37918
  61. package/dist/issue-BRzJy3k1.mjs +18 -0
  62. package/dist/issue-type-Byzh4yLx.mjs +11 -0
  63. package/dist/list-B3A5SDEm.mjs +35 -0
  64. package/dist/list-BMKaJoe_.mjs +64 -0
  65. package/dist/list-BOMbpS4m.mjs +46 -0
  66. package/dist/list-BmZ_JbLB.mjs +104 -0
  67. package/dist/list-BpUUxxwQ.mjs +46 -0
  68. package/dist/list-CgIebllW.mjs +94 -0
  69. package/dist/list-D0Z__0nw.mjs +42 -0
  70. package/dist/list-D3FkO9gb.mjs +56 -0
  71. package/dist/list-D7WLdHvX.mjs +42 -0
  72. package/dist/list-DAr3urtu.mjs +53 -0
  73. package/dist/list-DqpWd9aR.mjs +59 -0
  74. package/dist/list-VO_PbRjC.mjs +50 -0
  75. package/dist/list-b6ByzUFt.mjs +79 -0
  76. package/dist/list-jpQ28gU2.mjs +56 -0
  77. package/dist/list-y93EXyDj.mjs +42 -0
  78. package/dist/login-BnJYzdR3.mjs +228 -0
  79. package/dist/logout-YMnSRLLF.mjs +56 -0
  80. package/dist/me-CLPAe7X2.mjs +36 -0
  81. package/dist/milestone-Dc3alfp9.mjs +11 -0
  82. package/dist/notification-CsOuC8Uk.mjs +11 -0
  83. package/dist/output-DBvfyU1J.mjs +39 -0
  84. package/dist/pr-BBe07JUp.mjs +15 -0
  85. package/dist/project-Dilo1T5e.mjs +16 -0
  86. package/dist/read-BS2G4sNq.mjs +17 -0
  87. package/dist/read-CyCASx6U.mjs +17 -0
  88. package/dist/read-all-CjgMJ2to.mjs +16 -0
  89. package/dist/refresh-DDU2ZLnc.mjs +54 -0
  90. package/dist/registry-D8DfbunX.mjs +2 -0
  91. package/dist/registry-PlBmfTR4.mjs +35 -0
  92. package/dist/remove-BSDJvkVJ.mjs +17 -0
  93. package/dist/remove-user-CShNCvf8.mjs +26 -0
  94. package/dist/reopen-BIRhcmsI.mjs +28 -0
  95. package/dist/repo-B2K8y0mD.mjs +10 -0
  96. package/dist/role-labels-CLA2wmjO.mjs +11 -0
  97. package/dist/space-BgZeUqoH.mjs +6 -0
  98. package/dist/{shared/bee.CHtg3F43.mjs → src-BWaxjrq_.mjs} +143 -175
  99. package/dist/src-CP4YLIAh.mjs +1008 -0
  100. package/dist/src-CTD9-bSB.mjs +22760 -0
  101. package/dist/star-Sgb-e2CQ.mjs +11 -0
  102. package/dist/status-BkFMW8Jh.mjs +53 -0
  103. package/dist/status-CaGqMXh7.mjs +64 -0
  104. package/dist/status-DDFyQrRZ.mjs +11 -0
  105. package/dist/status-nI4Dpcoo.mjs +58 -0
  106. package/dist/stdin-C-vjNi9T.mjs +17 -0
  107. package/dist/switch-CMLfVGDN.mjs +34 -0
  108. package/dist/tags-DuMJZyBL.mjs +29 -0
  109. package/dist/team-DfQn8Tf5.mjs +6 -0
  110. package/dist/token-BmkUX9vc.mjs +28 -0
  111. package/dist/tree-CozBqPbN.mjs +46 -0
  112. package/dist/user-DMyFmoP3.mjs +11 -0
  113. package/dist/users-BSGqsGSy.mjs +51 -0
  114. package/dist/view-Bj99sk7O.mjs +48 -0
  115. package/dist/view-Bs8o0c7i.mjs +36 -0
  116. package/dist/view-C1ECwTMN.mjs +54 -0
  117. package/dist/view-COBYBfu7.mjs +38 -0
  118. package/dist/view-CZHT-HiE.mjs +36 -0
  119. package/dist/view-D1RuQJV6.mjs +76 -0
  120. package/dist/view-DBO75WzR.mjs +54 -0
  121. package/dist/view-DJHrnN8j.mjs +62 -0
  122. package/dist/view-DLx6qQt9.mjs +51 -0
  123. package/dist/watching-D22YYxOT.mjs +12 -0
  124. package/dist/wiki-B-DQUuIX.mjs +16 -0
  125. package/package.json +14 -11
  126. package/dist/chunks/activities.mjs +0 -75
  127. package/dist/chunks/activities2.mjs +0 -75
  128. package/dist/chunks/activities3.mjs +0 -75
  129. package/dist/chunks/add-user.mjs +0 -38
  130. package/dist/chunks/add.mjs +0 -63
  131. package/dist/chunks/add2.mjs +0 -39
  132. package/dist/chunks/api.mjs +0 -174
  133. package/dist/chunks/attachments.mjs +0 -47
  134. package/dist/chunks/attachments2.mjs +0 -47
  135. package/dist/chunks/attachments3.mjs +0 -48
  136. package/dist/chunks/browse.mjs +0 -269
  137. package/dist/chunks/clone.mjs +0 -60
  138. package/dist/chunks/close.mjs +0 -50
  139. package/dist/chunks/comment.mjs +0 -125
  140. package/dist/chunks/comment2.mjs +0 -111
  141. package/dist/chunks/comments.mjs +0 -57
  142. package/dist/chunks/completion.mjs +0 -113
  143. package/dist/chunks/count.mjs +0 -68
  144. package/dist/chunks/count2.mjs +0 -69
  145. package/dist/chunks/count3.mjs +0 -59
  146. package/dist/chunks/count4.mjs +0 -35
  147. package/dist/chunks/count5.mjs +0 -52
  148. package/dist/chunks/create.mjs +0 -60
  149. package/dist/chunks/create2.mjs +0 -88
  150. package/dist/chunks/create3.mjs +0 -64
  151. package/dist/chunks/create4.mjs +0 -74
  152. package/dist/chunks/create5.mjs +0 -56
  153. package/dist/chunks/create6.mjs +0 -37
  154. package/dist/chunks/create7.mjs +0 -45
  155. package/dist/chunks/create8.mjs +0 -49
  156. package/dist/chunks/create9.mjs +0 -49
  157. package/dist/chunks/dashboard.mjs +0 -84
  158. package/dist/chunks/delete.mjs +0 -48
  159. package/dist/chunks/delete2.mjs +0 -46
  160. package/dist/chunks/delete3.mjs +0 -46
  161. package/dist/chunks/delete4.mjs +0 -49
  162. package/dist/chunks/delete5.mjs +0 -50
  163. package/dist/chunks/delete6.mjs +0 -50
  164. package/dist/chunks/delete7.mjs +0 -62
  165. package/dist/chunks/delete8.mjs +0 -53
  166. package/dist/chunks/delete9.mjs +0 -48
  167. package/dist/chunks/edit.mjs +0 -56
  168. package/dist/chunks/edit2.mjs +0 -78
  169. package/dist/chunks/edit3.mjs +0 -65
  170. package/dist/chunks/edit4.mjs +0 -51
  171. package/dist/chunks/edit5.mjs +0 -43
  172. package/dist/chunks/edit6.mjs +0 -54
  173. package/dist/chunks/edit7.mjs +0 -50
  174. package/dist/chunks/edit8.mjs +0 -50
  175. package/dist/chunks/history.mjs +0 -56
  176. package/dist/chunks/index.mjs +0 -15
  177. package/dist/chunks/index10.mjs +0 -18
  178. package/dist/chunks/index11.mjs +0 -13
  179. package/dist/chunks/index12.mjs +0 -13
  180. package/dist/chunks/index13.mjs +0 -13
  181. package/dist/chunks/index14.mjs +0 -8
  182. package/dist/chunks/index15.mjs +0 -13
  183. package/dist/chunks/index16.mjs +0 -13
  184. package/dist/chunks/index17.mjs +0 -14
  185. package/dist/chunks/index2.mjs +0 -18
  186. package/dist/chunks/index3.mjs +0 -20
  187. package/dist/chunks/index4.mjs +0 -15
  188. package/dist/chunks/index5.mjs +0 -13
  189. package/dist/chunks/index6.mjs +0 -17
  190. package/dist/chunks/index7.mjs +0 -8
  191. package/dist/chunks/index8.mjs +0 -8
  192. package/dist/chunks/index9.mjs +0 -13
  193. package/dist/chunks/list.mjs +0 -52
  194. package/dist/chunks/list10.mjs +0 -44
  195. package/dist/chunks/list11.mjs +0 -49
  196. package/dist/chunks/list12.mjs +0 -45
  197. package/dist/chunks/list13.mjs +0 -45
  198. package/dist/chunks/list14.mjs +0 -54
  199. package/dist/chunks/list15.mjs +0 -46
  200. package/dist/chunks/list2.mjs +0 -103
  201. package/dist/chunks/list3.mjs +0 -85
  202. package/dist/chunks/list4.mjs +0 -79
  203. package/dist/chunks/list5.mjs +0 -77
  204. package/dist/chunks/list6.mjs +0 -45
  205. package/dist/chunks/list7.mjs +0 -48
  206. package/dist/chunks/list8.mjs +0 -46
  207. package/dist/chunks/list9.mjs +0 -53
  208. package/dist/chunks/login.mjs +0 -218
  209. package/dist/chunks/logout.mjs +0 -76
  210. package/dist/chunks/me.mjs +0 -48
  211. package/dist/chunks/read-all.mjs +0 -29
  212. package/dist/chunks/read.mjs +0 -29
  213. package/dist/chunks/read2.mjs +0 -27
  214. package/dist/chunks/refresh.mjs +0 -76
  215. package/dist/chunks/remove-user.mjs +0 -38
  216. package/dist/chunks/remove.mjs +0 -27
  217. package/dist/chunks/reopen.mjs +0 -42
  218. package/dist/chunks/status.mjs +0 -64
  219. package/dist/chunks/status2.mjs +0 -61
  220. package/dist/chunks/status3.mjs +0 -66
  221. package/dist/chunks/switch.mjs +0 -55
  222. package/dist/chunks/tags.mjs +0 -41
  223. package/dist/chunks/token.mjs +0 -42
  224. package/dist/chunks/tree.mjs +0 -61
  225. package/dist/chunks/users.mjs +0 -48
  226. package/dist/chunks/view.mjs +0 -58
  227. package/dist/chunks/view2.mjs +0 -95
  228. package/dist/chunks/view3.mjs +0 -68
  229. package/dist/chunks/view4.mjs +0 -70
  230. package/dist/chunks/view5.mjs +0 -61
  231. package/dist/chunks/view6.mjs +0 -52
  232. package/dist/chunks/view7.mjs +0 -48
  233. package/dist/chunks/view8.mjs +0 -61
  234. package/dist/chunks/view9.mjs +0 -48
  235. package/dist/shared/bee.084B_7FC.mjs +0 -27
  236. package/dist/shared/bee.BTBGpv4K.mjs +0 -34
  237. package/dist/shared/bee.BXiuAfjJ.mjs +0 -10
  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.CAARNIp6.mjs +0 -49
  242. package/dist/shared/bee.CirccSk2.mjs +0 -51
  243. package/dist/shared/bee.CktwmH8R.mjs +0 -25
  244. package/dist/shared/bee.CzKcWSES.mjs +0 -42
  245. package/dist/shared/bee.DFnSWb6q.mjs +0 -396
  246. package/dist/shared/bee.DoTvz3uW.mjs +0 -13
  247. package/dist/shared/bee.KteAW2rM.mjs +0 -73
  248. package/dist/shared/bee.RsR9yniy.mjs +0 -131
  249. package/dist/shared/bee.a05kNWpn.mjs +0 -32
  250. package/dist/shared/bee.n5MYN4a6.mjs +0 -12
  251. package/dist/shared/bee.q93n012-.mjs +0 -14
@@ -1,84 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import 'node:stream/consumers';
4
- import 'valibot';
5
- import '../index.mjs';
6
- import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
8
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
9
- import 'backlog-js';
10
- import 'node:http';
11
- import { o as openOrPrintUrl, d as dashboardUrl } from '../shared/bee.CzKcWSES.mjs';
12
- import 'node:child_process';
13
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
14
- import { j as json, w as web, n as noBrowser, s as space } from '../shared/bee.CHtg3F43.mjs';
15
- import 'node:fs';
16
- import 'node:path';
17
- import 'node:os';
18
- import 'open';
19
- import 'node:module';
20
- import 'commander';
21
- import 'consola/utils';
22
- import '../shared/bee.DFnSWb6q.mjs';
23
- import '../shared/bee.CktwmH8R.mjs';
24
- import '../shared/bee.CAARNIp6.mjs';
25
-
26
- const dashboard = new BeeCommand("dashboard").summary("Show a summary of your Backlog activity").description(
27
- `Displays assigned issues, unread notifications, and projects. Use \`--web\` to open in the browser.`
28
- ).addOption(json()).addOption(web("dashboard")).addOption(noBrowser()).addOption(space()).envVars([...ENV_AUTH]).examples([
29
- { description: "Show dashboard", command: "bee dashboard" },
30
- { description: "Open dashboard in browser", command: "bee dashboard --web" },
31
- { description: "Output as JSON", command: "bee dashboard --json" }
32
- ]).action(async (opts) => {
33
- const { client, host } = await getClient(opts.space);
34
- if (opts.web || opts.browser === false) {
35
- const url = dashboardUrl(host);
36
- await openOrPrintUrl(url, opts.browser === false, consola);
37
- return;
38
- }
39
- const [myself, notifications, issues, projects] = await Promise.all([
40
- client.getMyself(),
41
- client.getNotificationsCount({ alreadyRead: false, resourceAlreadyRead: false }),
42
- client.getIssues({
43
- assigneeId: [-1],
44
- statusId: [1, 2, 3],
45
- count: 20,
46
- sort: "dueDate",
47
- order: "asc"
48
- }),
49
- client.getProjects({ all: false })
50
- ]);
51
- const result = { myself, notifications, issues, projects };
52
- const jsonVal = opts.json === true ? "" : opts.json;
53
- outputResult(result, { json: jsonVal }, (data) => {
54
- consola.log("");
55
- consola.log(` ${data.myself.name} (${host})`);
56
- if (data.notifications.count > 0) {
57
- consola.log(` Unread notifications: ${data.notifications.count}`);
58
- }
59
- consola.log("");
60
- consola.log(" Assigned Issues:");
61
- if (data.issues.length === 0) {
62
- consola.log(" No assigned issues.");
63
- } else {
64
- const issueRows = data.issues.map((issue) => [
65
- { header: "KEY", value: issue.issueKey },
66
- { header: "SUMMARY", value: issue.summary },
67
- { header: "STATUS", value: issue.status?.name ?? "" },
68
- { header: "PRIORITY", value: issue.priority?.name ?? "" },
69
- { header: "DUE DATE", value: issue.dueDate ? formatDate(issue.dueDate) : "" }
70
- ]);
71
- printTable(issueRows);
72
- }
73
- if (data.projects.length > 0) {
74
- consola.log("");
75
- consola.log(" Projects:");
76
- for (const project of data.projects) {
77
- consola.log(` ${project.projectKey.padEnd(20)} ${project.name}`);
78
- }
79
- }
80
- consola.log("");
81
- });
82
- });
83
-
84
- export { dashboard as default };
@@ -1,48 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { d as project, j as json, s as space, r as resolveOptions, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteProject = new BeeCommand("delete").summary("Delete a project").description(`This action is irreversible. Requires Administrator role.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
23
- {
24
- description: "Delete a project (with confirmation)",
25
- command: "bee project delete -p PROJECT_KEY"
26
- },
27
- {
28
- description: "Delete a project without confirmation",
29
- command: "bee project delete -p PROJECT_KEY --yes"
30
- }
31
- ]).action(async (opts, cmd) => {
32
- await resolveOptions(cmd);
33
- const confirmed = await confirmOrExit(
34
- `Are you sure you want to delete project ${opts.project}? This cannot be undone.`,
35
- opts.yes
36
- );
37
- if (!confirmed) {
38
- return;
39
- }
40
- const { client } = await getClient(opts.space);
41
- const projectData = await client.deleteProject(opts.project);
42
- const jsonArg = opts.json === true ? "" : opts.json;
43
- outputResult(projectData, { ...opts, json: jsonArg }, (data) => {
44
- consola.success(`Deleted project ${data.projectKey}: ${data.name}`);
45
- });
46
- });
47
-
48
- export { deleteProject as default };
@@ -1,46 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { j as json, s as space, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteIssue = new BeeCommand("delete").summary("Delete an issue").description(`This action is irreversible.`).argument("<issue>", "Issue ID or issue key").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
23
- {
24
- description: "Delete an issue (with confirmation)",
25
- command: "bee issue delete PROJECT-123"
26
- },
27
- {
28
- description: "Delete an issue without confirmation",
29
- command: "bee issue delete PROJECT-123 --yes"
30
- }
31
- ]).action(async (issue, opts) => {
32
- const confirmed = await confirmOrExit(
33
- `Are you sure you want to delete issue ${issue}? This cannot be undone.`,
34
- opts.yes
35
- );
36
- if (!confirmed) {
37
- return;
38
- }
39
- const { client } = await getClient(opts.space);
40
- const issueData = await client.deleteIssue(issue);
41
- outputResult(issueData, opts, (data) => {
42
- consola.success(`Deleted issue ${data.issueKey}: ${data.summary}`);
43
- });
44
- });
45
-
46
- export { deleteIssue as default };
@@ -1,46 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { j as json, s as space, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteDocument = new BeeCommand("delete").summary("Delete a document").description(`This action is irreversible.`).argument("<document>", "Document ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
23
- {
24
- description: "Delete a document (with confirmation)",
25
- command: "bee document delete 12345"
26
- },
27
- {
28
- description: "Delete a document without confirmation",
29
- command: "bee document delete 12345 --yes"
30
- }
31
- ]).action(async (document, opts) => {
32
- const confirmed = await confirmOrExit(
33
- `Are you sure you want to delete document ${document}? This cannot be undone.`,
34
- opts.yes
35
- );
36
- if (!confirmed) {
37
- return;
38
- }
39
- const { client } = await getClient(opts.space);
40
- const doc = await client.deleteDocument(document);
41
- outputResult(doc, opts, (data) => {
42
- consola.success(`Deleted document ${data.title} (ID: ${data.id})`);
43
- });
44
- });
45
-
46
- export { deleteDocument as default };
@@ -1,49 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { j as json, s as space, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import { p as parseArg, v as vInteger } from '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteWiki = new BeeCommand("delete").summary("Delete a wiki page").description(`This action is irreversible.`).argument("<wiki>", "Wiki page ID").option("--mail-notify", "Send notification email").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
23
- {
24
- description: "Delete a wiki page (with confirmation)",
25
- command: "bee wiki delete 12345"
26
- },
27
- {
28
- description: "Delete a wiki page without confirmation",
29
- command: "bee wiki delete 12345 --yes"
30
- }
31
- ]).action(async (wiki, opts) => {
32
- const confirmed = await confirmOrExit(
33
- `Are you sure you want to delete wiki page ${wiki}? This cannot be undone.`,
34
- opts.yes
35
- );
36
- if (!confirmed) {
37
- return;
38
- }
39
- const { client } = await getClient(opts.space);
40
- const wikiData = await client.deleteWiki(
41
- parseArg(vInteger, wiki, "wiki"),
42
- opts.mailNotify ?? false
43
- );
44
- outputResult(wikiData, opts, (data) => {
45
- consola.success(`Deleted wiki page ${data.id}: ${data.name}`);
46
- });
47
- });
48
-
49
- export { deleteWiki as default };
@@ -1,50 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { d as project, j as json, s as space, r as resolveOptions, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import { p as parseArg, v as vInteger } from '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteCategory = new BeeCommand("delete").summary("Delete a category").description(`This action is irreversible.`).argument("<category>", "Category ID").addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
23
- {
24
- description: "Delete a category (with confirmation)",
25
- command: "bee category delete 12345 -p PROJECT"
26
- },
27
- {
28
- description: "Delete without confirmation",
29
- command: "bee category delete 12345 -p PROJECT --yes"
30
- }
31
- ]).action(async (category, opts, cmd) => {
32
- await resolveOptions(cmd);
33
- const confirmed = await confirmOrExit(
34
- `Are you sure you want to delete category ${category}? This cannot be undone.`,
35
- opts.yes
36
- );
37
- if (!confirmed) {
38
- return;
39
- }
40
- const { client } = await getClient(opts.space);
41
- const result = await client.deleteCategories(
42
- opts.project,
43
- parseArg(vInteger, category, "category")
44
- );
45
- outputResult(result, opts, (data) => {
46
- consola.success(`Deleted category ${data.name} (ID: ${data.id})`);
47
- });
48
- });
49
-
50
- export { deleteCategory as default };
@@ -1,50 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { d as project, j as json, s as space, r as resolveOptions, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import { p as parseArg, v as vInteger } from '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteMilestone = new BeeCommand("delete").summary("Delete a milestone").description(`This action is irreversible.`).argument("<milestone>", "Milestone ID").addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
23
- {
24
- description: "Delete a milestone (with confirmation)",
25
- command: "bee milestone delete 12345 -p PROJECT"
26
- },
27
- {
28
- description: "Delete without confirmation",
29
- command: "bee milestone delete 12345 -p PROJECT --yes"
30
- }
31
- ]).action(async (milestone, opts, cmd) => {
32
- await resolveOptions(cmd);
33
- const confirmed = await confirmOrExit(
34
- `Are you sure you want to delete milestone ${milestone}? This cannot be undone.`,
35
- opts.yes
36
- );
37
- if (!confirmed) {
38
- return;
39
- }
40
- const { client } = await getClient(opts.space);
41
- const result = await client.deleteVersions(
42
- opts.project,
43
- parseArg(vInteger, milestone, "milestone")
44
- );
45
- outputResult(result, opts, (data) => {
46
- consola.success(`Deleted milestone ${data.name} (ID: ${data.id})`);
47
- });
48
- });
49
-
50
- export { deleteMilestone as default };
@@ -1,62 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { d as project, j as json, s as space, r as resolveOptions, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import { p as parseArg, v as vInteger } from '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteIssueType = new BeeCommand("delete").summary("Delete an issue type").description(
23
- `All issues of this type are reassigned to the substitute issue type. This action is irreversible.`
24
- ).argument("<issueType>", "Issue type ID").addOption(project()).requiredOption(
25
- "--substitute-issue-type-id <value>",
26
- "Replacement issue type ID for affected issues"
27
- ).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
28
- {
29
- description: "Delete an issue type",
30
- command: "bee issue-type delete 12345 -p PROJECT --substitute-issue-type-id 67890"
31
- },
32
- {
33
- description: "Delete without confirmation",
34
- command: "bee issue-type delete 12345 -p PROJECT --substitute-issue-type-id 67890 --yes"
35
- }
36
- ]).action(async (issueType, opts, cmd) => {
37
- await resolveOptions(cmd);
38
- const confirmed = await confirmOrExit(
39
- `Are you sure you want to delete issue type ${issueType}? This cannot be undone.`,
40
- opts.yes
41
- );
42
- if (!confirmed) {
43
- return;
44
- }
45
- const { client } = await getClient(opts.space);
46
- const result = await client.deleteIssueType(
47
- opts.project,
48
- parseArg(vInteger, issueType, "issueType"),
49
- {
50
- substituteIssueTypeId: parseArg(
51
- vInteger,
52
- opts.substituteIssueTypeId,
53
- "--substitute-issue-type-id"
54
- )
55
- }
56
- );
57
- outputResult(result, opts, (data) => {
58
- consola.success(`Deleted issue type ${data.name} (ID: ${data.id})`);
59
- });
60
- });
61
-
62
- export { deleteIssueType as default };
@@ -1,53 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { d as project, j as json, s as space, r as resolveOptions, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import { p as parseArg, v as vInteger } from '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteStatus = new BeeCommand("delete").summary("Delete a status").description(
23
- `All issues with this status are reassigned to the substitute status. This action is irreversible.`
24
- ).argument("<status>", "Status ID").addOption(project()).requiredOption("--substitute-status-id <value>", "Replacement status ID for affected issues").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
25
- {
26
- description: "Delete a status",
27
- command: "bee status delete 12345 -p PROJECT --substitute-status-id 67890"
28
- },
29
- {
30
- description: "Delete without confirmation",
31
- command: "bee status delete 12345 -p PROJECT --substitute-status-id 67890 --yes"
32
- }
33
- ]).action(async (status, opts, cmd) => {
34
- await resolveOptions(cmd);
35
- const confirmed = await confirmOrExit(
36
- `Are you sure you want to delete status ${status}? This cannot be undone.`,
37
- opts.yes
38
- );
39
- if (!confirmed) {
40
- return;
41
- }
42
- const { client } = await getClient(opts.space);
43
- const result = await client.deleteProjectStatus(
44
- opts.project,
45
- parseArg(vInteger, status, "status"),
46
- parseArg(vInteger, opts.substituteStatusId, "--substitute-status-id")
47
- );
48
- outputResult(result, opts, (data) => {
49
- consola.success(`Deleted status ${data.name} (ID: ${data.id})`);
50
- });
51
- });
52
-
53
- export { deleteStatus as default };
@@ -1,48 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import { j as json, s as space, e as confirmOrExit } from '../shared/bee.CHtg3F43.mjs';
4
- import 'node:stream/consumers';
5
- import 'valibot';
6
- import { p as parseArg, v as vInteger } from '../index.mjs';
7
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
8
- import 'backlog-js';
9
- import 'node:http';
10
- import 'open';
11
- import 'node:child_process';
12
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'commander';
17
- import 'node:module';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- const deleteWatching = new BeeCommand("delete").summary("Delete a watching item").description(
23
- `Removes the issue from your watching list. You will no longer receive update notifications.`
24
- ).argument("<watching>", "Watching ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
25
- {
26
- description: "Delete a watching item (with confirmation)",
27
- command: "bee watching delete 12345"
28
- },
29
- {
30
- description: "Delete without confirmation",
31
- command: "bee watching delete 12345 --yes"
32
- }
33
- ]).action(async (watching, opts) => {
34
- const confirmed = await confirmOrExit(
35
- `Are you sure you want to delete watching ${watching}? This cannot be undone.`,
36
- opts.yes
37
- );
38
- if (!confirmed) {
39
- return;
40
- }
41
- const { client } = await getClient(opts.space);
42
- const result = await client.deletehWatchingListItem(parseArg(vInteger, watching, "watching"));
43
- outputResult(result, opts, (data) => {
44
- consola.success(`Deleted watching ${data.id}.`);
45
- });
46
- });
47
-
48
- export { deleteWatching as default };
@@ -1,56 +0,0 @@
1
- import consola from 'consola';
2
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
- import 'node:stream/consumers';
4
- import 'valibot';
5
- import '../index.mjs';
6
- import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
7
- import 'backlog-js';
8
- import 'node:http';
9
- import 'open';
10
- import 'node:child_process';
11
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
12
- import { d as project, j as json, s as space, r as resolveOptions } from '../shared/bee.CHtg3F43.mjs';
13
- import 'node:fs';
14
- import 'node:path';
15
- import 'node:os';
16
- import 'node:module';
17
- import 'commander';
18
- import 'consola/utils';
19
- import '../shared/bee.CktwmH8R.mjs';
20
- import '../shared/bee.CAARNIp6.mjs';
21
-
22
- 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(
23
- "--project-leader-can-edit-project-leader",
24
- "Change whether project administrators can manage each other"
25
- ).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([
26
- {
27
- description: "Rename a project",
28
- command: 'bee project edit -p PROJECT_KEY --name "New Name"'
29
- },
30
- {
31
- description: "Archive a project",
32
- command: "bee project edit -p PROJECT_KEY --archived"
33
- },
34
- {
35
- description: "Change formatting rule to markdown",
36
- command: "bee project edit -p PROJECT_KEY --text-formatting-rule markdown"
37
- }
38
- ]).action(async (opts, cmd) => {
39
- await resolveOptions(cmd);
40
- const { client } = await getClient(opts.space);
41
- const projectData = await client.patchProject(opts.project, {
42
- name: opts.name,
43
- key: opts.key,
44
- chartEnabled: opts.chartEnabled,
45
- subtaskingEnabled: opts.subtaskingEnabled,
46
- projectLeaderCanEditProjectLeader: opts.projectLeaderCanEditProjectLeader,
47
- textFormattingRule: opts.textFormattingRule,
48
- archived: opts.archived
49
- });
50
- const jsonArg = opts.json === true ? "" : opts.json;
51
- outputResult(projectData, { ...opts, json: jsonArg }, (data) => {
52
- consola.success(`Updated project ${data.projectKey}: ${data.name}`);
53
- });
54
- });
55
-
56
- export { edit as default };