@nulab/bee 0.0.0 → 1.0.0-rc.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 (135) hide show
  1. package/README.md +36 -0
  2. package/bin/cli.mjs +2 -0
  3. package/dist/chunks/activities.mjs +90 -0
  4. package/dist/chunks/activities2.mjs +91 -0
  5. package/dist/chunks/activities3.mjs +91 -0
  6. package/dist/chunks/add-user.mjs +42 -0
  7. package/dist/chunks/add.mjs +62 -0
  8. package/dist/chunks/add2.mjs +40 -0
  9. package/dist/chunks/api.mjs +138 -0
  10. package/dist/chunks/attachments.mjs +48 -0
  11. package/dist/chunks/attachments2.mjs +48 -0
  12. package/dist/chunks/attachments3.mjs +49 -0
  13. package/dist/chunks/browse.mjs +270 -0
  14. package/dist/chunks/clone.mjs +61 -0
  15. package/dist/chunks/close.mjs +51 -0
  16. package/dist/chunks/comment.mjs +124 -0
  17. package/dist/chunks/comment2.mjs +112 -0
  18. package/dist/chunks/comments.mjs +58 -0
  19. package/dist/chunks/completion.mjs +118 -0
  20. package/dist/chunks/count.mjs +74 -0
  21. package/dist/chunks/count2.mjs +70 -0
  22. package/dist/chunks/count3.mjs +60 -0
  23. package/dist/chunks/count4.mjs +35 -0
  24. package/dist/chunks/count5.mjs +53 -0
  25. package/dist/chunks/create.mjs +61 -0
  26. package/dist/chunks/create2.mjs +83 -0
  27. package/dist/chunks/create3.mjs +65 -0
  28. package/dist/chunks/create4.mjs +74 -0
  29. package/dist/chunks/create5.mjs +57 -0
  30. package/dist/chunks/create6.mjs +38 -0
  31. package/dist/chunks/create7.mjs +46 -0
  32. package/dist/chunks/create8.mjs +50 -0
  33. package/dist/chunks/create9.mjs +50 -0
  34. package/dist/chunks/dashboard.mjs +85 -0
  35. package/dist/chunks/delete.mjs +48 -0
  36. package/dist/chunks/delete2.mjs +47 -0
  37. package/dist/chunks/delete3.mjs +47 -0
  38. package/dist/chunks/delete4.mjs +47 -0
  39. package/dist/chunks/delete5.mjs +48 -0
  40. package/dist/chunks/delete6.mjs +48 -0
  41. package/dist/chunks/delete7.mjs +55 -0
  42. package/dist/chunks/delete8.mjs +54 -0
  43. package/dist/chunks/delete9.mjs +49 -0
  44. package/dist/chunks/edit.mjs +56 -0
  45. package/dist/chunks/edit2.mjs +73 -0
  46. package/dist/chunks/edit3.mjs +65 -0
  47. package/dist/chunks/edit4.mjs +52 -0
  48. package/dist/chunks/edit5.mjs +38 -0
  49. package/dist/chunks/edit6.mjs +51 -0
  50. package/dist/chunks/edit7.mjs +47 -0
  51. package/dist/chunks/edit8.mjs +47 -0
  52. package/dist/chunks/history.mjs +57 -0
  53. package/dist/chunks/index.mjs +15 -0
  54. package/dist/chunks/index10.mjs +18 -0
  55. package/dist/chunks/index11.mjs +13 -0
  56. package/dist/chunks/index12.mjs +13 -0
  57. package/dist/chunks/index13.mjs +13 -0
  58. package/dist/chunks/index14.mjs +8 -0
  59. package/dist/chunks/index15.mjs +13 -0
  60. package/dist/chunks/index16.mjs +13 -0
  61. package/dist/chunks/index17.mjs +14 -0
  62. package/dist/chunks/index2.mjs +18 -0
  63. package/dist/chunks/index3.mjs +20 -0
  64. package/dist/chunks/index4.mjs +15 -0
  65. package/dist/chunks/index5.mjs +13 -0
  66. package/dist/chunks/index6.mjs +17 -0
  67. package/dist/chunks/index7.mjs +8 -0
  68. package/dist/chunks/index8.mjs +8 -0
  69. package/dist/chunks/index9.mjs +13 -0
  70. package/dist/chunks/list.mjs +53 -0
  71. package/dist/chunks/list10.mjs +44 -0
  72. package/dist/chunks/list11.mjs +49 -0
  73. package/dist/chunks/list12.mjs +45 -0
  74. package/dist/chunks/list13.mjs +45 -0
  75. package/dist/chunks/list14.mjs +55 -0
  76. package/dist/chunks/list15.mjs +47 -0
  77. package/dist/chunks/list2.mjs +95 -0
  78. package/dist/chunks/list3.mjs +86 -0
  79. package/dist/chunks/list4.mjs +80 -0
  80. package/dist/chunks/list5.mjs +78 -0
  81. package/dist/chunks/list6.mjs +45 -0
  82. package/dist/chunks/list7.mjs +49 -0
  83. package/dist/chunks/list8.mjs +47 -0
  84. package/dist/chunks/list9.mjs +53 -0
  85. package/dist/chunks/login.mjs +206 -0
  86. package/dist/chunks/logout.mjs +57 -0
  87. package/dist/chunks/me.mjs +49 -0
  88. package/dist/chunks/read-all.mjs +30 -0
  89. package/dist/chunks/read.mjs +30 -0
  90. package/dist/chunks/read2.mjs +28 -0
  91. package/dist/chunks/refresh.mjs +77 -0
  92. package/dist/chunks/remove-user.mjs +42 -0
  93. package/dist/chunks/remove.mjs +28 -0
  94. package/dist/chunks/reopen.mjs +43 -0
  95. package/dist/chunks/status.mjs +62 -0
  96. package/dist/chunks/status2.mjs +62 -0
  97. package/dist/chunks/status3.mjs +67 -0
  98. package/dist/chunks/switch.mjs +52 -0
  99. package/dist/chunks/tags.mjs +41 -0
  100. package/dist/chunks/token.mjs +39 -0
  101. package/dist/chunks/tree.mjs +61 -0
  102. package/dist/chunks/users.mjs +48 -0
  103. package/dist/chunks/view.mjs +58 -0
  104. package/dist/chunks/view2.mjs +95 -0
  105. package/dist/chunks/view3.mjs +69 -0
  106. package/dist/chunks/view4.mjs +71 -0
  107. package/dist/chunks/view5.mjs +62 -0
  108. package/dist/chunks/view6.mjs +53 -0
  109. package/dist/chunks/view7.mjs +49 -0
  110. package/dist/chunks/view8.mjs +62 -0
  111. package/dist/chunks/view9.mjs +49 -0
  112. package/dist/index.mjs +152 -0
  113. package/dist/shared/bee.-8tk76YJ.mjs +42 -0
  114. package/dist/shared/bee.BTBGpv4K.mjs +34 -0
  115. package/dist/shared/bee.BXiuAfjJ.mjs +10 -0
  116. package/dist/shared/bee.BeQSH2t0.mjs +25 -0
  117. package/dist/shared/bee.Btmq3TXs.mjs +19 -0
  118. package/dist/shared/bee.C--ZWPxf.mjs +14 -0
  119. package/dist/shared/bee.CCNmDHVv.mjs +33 -0
  120. package/dist/shared/bee.CQ3kBgas.mjs +58 -0
  121. package/dist/shared/bee.CThuQMit.mjs +124 -0
  122. package/dist/shared/bee.ChBdZ0cH.mjs +9 -0
  123. package/dist/shared/bee.CktwmH8R.mjs +25 -0
  124. package/dist/shared/bee.CzKcWSES.mjs +42 -0
  125. package/dist/shared/bee.D6yQ6Pqf.mjs +18 -0
  126. package/dist/shared/bee.DHTPkjMh.mjs +48 -0
  127. package/dist/shared/bee.DVTuFf-T.mjs +276 -0
  128. package/dist/shared/bee.DoTvz3uW.mjs +13 -0
  129. package/dist/shared/bee.Ds2l-nTJ.mjs +308 -0
  130. package/dist/shared/bee.IM3QELRf.mjs +32 -0
  131. package/dist/shared/bee.XxOB1Her.mjs +8 -0
  132. package/dist/shared/bee.n5MYN4a6.mjs +12 -0
  133. package/dist/shared/bee.sHWg0IFT.mjs +22 -0
  134. package/package.json +50 -2
  135. package/.github/workflows/initial-release.yml +0 -23
@@ -0,0 +1,47 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteDocument = new BeeCommand("delete").summary("Delete a document").description(`This action is irreversible.`).argument("<document>", "Document ID").option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
24
+ {
25
+ description: "Delete a document (with confirmation)",
26
+ command: "bee document delete 12345"
27
+ },
28
+ {
29
+ description: "Delete a document without confirmation",
30
+ command: "bee document delete 12345 --yes"
31
+ }
32
+ ]).action(async (document, opts) => {
33
+ const confirmed = await confirmOrExit(
34
+ `Are you sure you want to delete document ${document}? This cannot be undone.`,
35
+ opts.yes
36
+ );
37
+ if (!confirmed) {
38
+ return;
39
+ }
40
+ const { client } = await getClient(opts.space);
41
+ const doc = await client.deleteDocument(document);
42
+ outputResult(doc, opts, (data) => {
43
+ consola.success(`Deleted document ${data.title} (ID: ${data.id})`);
44
+ });
45
+ });
46
+
47
+ export { deleteDocument as default };
@@ -0,0 +1,47 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteWiki = new BeeCommand("delete").summary("Delete a wiki page").description(`This action is irreversible.`).argument("<wiki>", "Wiki page ID").option("-y, --yes", "Skip confirmation prompt").option("--mail-notify", "Send notification email").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
24
+ {
25
+ description: "Delete a wiki page (with confirmation)",
26
+ command: "bee wiki delete 12345"
27
+ },
28
+ {
29
+ description: "Delete a wiki page without confirmation",
30
+ command: "bee wiki delete 12345 --yes"
31
+ }
32
+ ]).action(async (wiki, opts) => {
33
+ const confirmed = await confirmOrExit(
34
+ `Are you sure you want to delete wiki page ${wiki}? This cannot be undone.`,
35
+ opts.yes
36
+ );
37
+ if (!confirmed) {
38
+ return;
39
+ }
40
+ const { client } = await getClient(opts.space);
41
+ const wikiData = await client.deleteWiki(Number(wiki), opts.mailNotify ?? false);
42
+ outputResult(wikiData, opts, (data) => {
43
+ consola.success(`Deleted wiki page ${data.id}: ${data.name}`);
44
+ });
45
+ });
46
+
47
+ export { deleteWiki as default };
@@ -0,0 +1,48 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteCategory = new BeeCommand("delete").summary("Delete a category").description(`This action is irreversible.`).argument("<category>", "Category ID").addOption(project()).option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
24
+ {
25
+ description: "Delete a category (with confirmation)",
26
+ command: "bee category delete 12345 -p PROJECT"
27
+ },
28
+ {
29
+ description: "Delete without confirmation",
30
+ command: "bee category delete 12345 -p PROJECT --yes"
31
+ }
32
+ ]).action(async (category, opts, cmd) => {
33
+ await resolveOptions(cmd);
34
+ const confirmed = await confirmOrExit(
35
+ `Are you sure you want to delete category ${category}? 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.deleteCategories(opts.project, Number(category));
43
+ outputResult(result, opts, (data) => {
44
+ consola.success(`Deleted category ${data.name} (ID: ${data.id})`);
45
+ });
46
+ });
47
+
48
+ export { deleteCategory as default };
@@ -0,0 +1,48 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteMilestone = new BeeCommand("delete").summary("Delete a milestone").description(`This action is irreversible.`).argument("<milestone>", "Milestone ID").addOption(project()).option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
24
+ {
25
+ description: "Delete a milestone (with confirmation)",
26
+ command: "bee milestone delete 12345 -p PROJECT"
27
+ },
28
+ {
29
+ description: "Delete without confirmation",
30
+ command: "bee milestone delete 12345 -p PROJECT --yes"
31
+ }
32
+ ]).action(async (milestone, opts, cmd) => {
33
+ await resolveOptions(cmd);
34
+ const confirmed = await confirmOrExit(
35
+ `Are you sure you want to delete milestone ${milestone}? 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.deleteVersions(opts.project, Number(milestone));
43
+ outputResult(result, opts, (data) => {
44
+ consola.success(`Deleted milestone ${data.name} (ID: ${data.id})`);
45
+ });
46
+ });
47
+
48
+ export { deleteMilestone as default };
@@ -0,0 +1,55 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteIssueType = new BeeCommand("delete").summary("Delete an issue type").description(
24
+ `All issues of this type are reassigned to the substitute issue type. This action is irreversible.`
25
+ ).argument("<issueType>", "Issue type ID").addOption(project()).requiredOption(
26
+ "--substitute-issue-type-id <value>",
27
+ "Replacement issue type ID for affected issues"
28
+ ).option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
29
+ {
30
+ description: "Delete an issue type",
31
+ command: "bee issue-type delete 12345 -p PROJECT --substitute-issue-type-id 67890"
32
+ },
33
+ {
34
+ description: "Delete without confirmation",
35
+ command: "bee issue-type delete 12345 -p PROJECT --substitute-issue-type-id 67890 --yes"
36
+ }
37
+ ]).action(async (issueType, opts, cmd) => {
38
+ await resolveOptions(cmd);
39
+ const confirmed = await confirmOrExit(
40
+ `Are you sure you want to delete issue type ${issueType}? This cannot be undone.`,
41
+ opts.yes
42
+ );
43
+ if (!confirmed) {
44
+ return;
45
+ }
46
+ const { client } = await getClient(opts.space);
47
+ const result = await client.deleteIssueType(opts.project, Number(issueType), {
48
+ substituteIssueTypeId: Number(opts.substituteIssueTypeId)
49
+ });
50
+ outputResult(result, opts, (data) => {
51
+ consola.success(`Deleted issue type ${data.name} (ID: ${data.id})`);
52
+ });
53
+ });
54
+
55
+ export { deleteIssueType as default };
@@ -0,0 +1,54 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteStatus = new BeeCommand("delete").summary("Delete a status").description(
24
+ `All issues with this status are reassigned to the substitute status. This action is irreversible.`
25
+ ).argument("<status>", "Status ID").addOption(project()).requiredOption("--substitute-status-id <value>", "Replacement status ID for affected issues").option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
26
+ {
27
+ description: "Delete a status",
28
+ command: "bee status delete 12345 -p PROJECT --substitute-status-id 67890"
29
+ },
30
+ {
31
+ description: "Delete without confirmation",
32
+ command: "bee status delete 12345 -p PROJECT --substitute-status-id 67890 --yes"
33
+ }
34
+ ]).action(async (status, opts, cmd) => {
35
+ await resolveOptions(cmd);
36
+ const confirmed = await confirmOrExit(
37
+ `Are you sure you want to delete status ${status}? This cannot be undone.`,
38
+ opts.yes
39
+ );
40
+ if (!confirmed) {
41
+ return;
42
+ }
43
+ const { client } = await getClient(opts.space);
44
+ const result = await client.deleteProjectStatus(
45
+ opts.project,
46
+ Number(status),
47
+ Number(opts.substituteStatusId)
48
+ );
49
+ outputResult(result, opts, (data) => {
50
+ consola.success(`Deleted status ${data.name} (ID: ${data.id})`);
51
+ });
52
+ });
53
+
54
+ export { deleteStatus as default };
@@ -0,0 +1,49 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { c as confirmOrExit } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const deleteWatching = new BeeCommand("delete").summary("Delete a watching item").description(
24
+ `Removes the issue from your watching list. You will no longer receive update notifications.`
25
+ ).argument("<watching>", "Watching ID").option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
26
+ {
27
+ description: "Delete a watching item (with confirmation)",
28
+ command: "bee watching delete 12345"
29
+ },
30
+ {
31
+ description: "Delete without confirmation",
32
+ command: "bee watching delete 12345 --yes"
33
+ }
34
+ ]).action(async (watching, opts) => {
35
+ const confirmed = await confirmOrExit(
36
+ `Are you sure you want to delete watching ${watching}? 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.deletehWatchingListItem(Number(watching));
44
+ outputResult(result, opts, (data) => {
45
+ consola.success(`Deleted watching ${data.id}.`);
46
+ });
47
+ });
48
+
49
+ export { deleteWatching as default };
@@ -0,0 +1,56 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import 'node:stream/consumers';
9
+ import 'valibot';
10
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.CQ3kBgas.mjs';
11
+ import { j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
12
+ import '../shared/bee.XxOB1Her.mjs';
13
+ import '../shared/bee.CktwmH8R.mjs';
14
+ import '../shared/bee.DVTuFf-T.mjs';
15
+ import 'node:fs';
16
+ import 'node:path';
17
+ import 'node:os';
18
+ import '../shared/bee.BeQSH2t0.mjs';
19
+ import '../shared/bee.-8tk76YJ.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const edit = new BeeCommand("edit").summary("Edit a project").description(`Only specified fields are updated; others remain unchanged.`).argument("<project>", "Project ID or project key").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(
24
+ "--project-leader-can-edit-project-leader",
25
+ "Change whether project administrators can manage each other"
26
+ ).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([
27
+ {
28
+ description: "Rename a project",
29
+ command: 'bee project edit PROJECT_KEY --name "New Name"'
30
+ },
31
+ {
32
+ description: "Archive a project",
33
+ command: "bee project edit PROJECT_KEY --archived"
34
+ },
35
+ {
36
+ description: "Change formatting rule to markdown",
37
+ command: "bee project edit PROJECT_KEY --text-formatting-rule markdown"
38
+ }
39
+ ]).action(async (project, opts) => {
40
+ const { client } = await getClient(opts.space);
41
+ const projectData = await client.patchProject(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 };
@@ -0,0 +1,73 @@
1
+ import consola from 'consola';
2
+ import { P as PriorityId, a as PRIORITY_NAMES } from '../shared/bee.Btmq3TXs.mjs';
3
+ import { r as resolveUserId } from '../shared/bee.ChBdZ0cH.mjs';
4
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
5
+ import 'backlog-js';
6
+ import 'node:http';
7
+ import 'open';
8
+ import 'node:child_process';
9
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
10
+ import 'node:stream/consumers';
11
+ import 'valibot';
12
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
13
+ import { i as comment, g as notify, h as attachment, j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
14
+ import '../shared/bee.XxOB1Her.mjs';
15
+ import '../shared/bee.CktwmH8R.mjs';
16
+ import '../shared/bee.DVTuFf-T.mjs';
17
+ import 'node:fs';
18
+ import 'node:path';
19
+ import 'node:os';
20
+ import '../shared/bee.BeQSH2t0.mjs';
21
+ import '../shared/bee.-8tk76YJ.mjs';
22
+ import 'commander';
23
+ import 'consola/utils';
24
+
25
+ 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.").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([
26
+ {
27
+ description: "Update issue title",
28
+ command: 'bee issue edit PROJECT-123 -t "New title"'
29
+ },
30
+ {
31
+ description: "Change assignee and priority",
32
+ command: "bee issue edit PROJECT-123 --assignee 12345 --priority high"
33
+ },
34
+ {
35
+ description: "Add a comment with the update",
36
+ command: 'bee issue edit PROJECT-123 -t "New title" --comment "Updated title"'
37
+ }
38
+ ]).action(async (issue, opts) => {
39
+ const { client } = await getClient(opts.space);
40
+ const notifiedUserId = opts.notify ?? [];
41
+ const attachmentId = opts.attachment ?? [];
42
+ let priorityId;
43
+ if (opts.priority) {
44
+ priorityId = PriorityId[opts.priority.toLowerCase()];
45
+ if (priorityId === void 0) {
46
+ throw new Error(
47
+ `Unknown priority "${opts.priority}". Valid values: ${PRIORITY_NAMES.join(", ")}`
48
+ );
49
+ }
50
+ }
51
+ const issueData = await client.patchIssue(issue, {
52
+ summary: opts.title,
53
+ description: opts.description,
54
+ statusId: opts.status ? Number(opts.status) : void 0,
55
+ priorityId,
56
+ issueTypeId: opts.type ? Number(opts.type) : void 0,
57
+ assigneeId: opts.assignee ? await resolveUserId(client, opts.assignee) : void 0,
58
+ resolutionId: opts.resolution ? Number(opts.resolution) : void 0,
59
+ parentIssueId: opts.parentIssue ? Number(opts.parentIssue) : void 0,
60
+ startDate: opts.startDate,
61
+ dueDate: opts.dueDate,
62
+ estimatedHours: opts.estimatedHours ? Number(opts.estimatedHours) : void 0,
63
+ actualHours: opts.actualHours ? Number(opts.actualHours) : void 0,
64
+ comment: opts.comment,
65
+ notifiedUserId,
66
+ attachmentId
67
+ });
68
+ outputResult(issueData, opts, (data) => {
69
+ consola.success(`Updated issue ${data.issueKey}: ${data.summary}`);
70
+ });
71
+ });
72
+
73
+ export { edit as default };
@@ -0,0 +1,65 @@
1
+ import consola from 'consola';
2
+ import { r as resolveUserId } from '../shared/bee.ChBdZ0cH.mjs';
3
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
4
+ import 'backlog-js';
5
+ import 'node:http';
6
+ import 'open';
7
+ import 'node:child_process';
8
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT, b as ENV_REPO } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { p as project, q as repo, i as comment, g as notify, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.DVTuFf-T.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import '../shared/bee.-8tk76YJ.mjs';
21
+ import 'commander';
22
+ import 'consola/utils';
23
+
24
+ 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([...ENV_AUTH, ENV_PROJECT, ENV_REPO]).examples([
25
+ {
26
+ description: "Update pull request title",
27
+ command: 'bee pr edit 42 -p PROJECT -R repo -t "New title"'
28
+ },
29
+ {
30
+ description: "Change assignee",
31
+ command: "bee pr edit 42 -p PROJECT -R repo --assignee 12345"
32
+ },
33
+ {
34
+ description: "Add a comment with the update",
35
+ command: 'bee pr edit 42 -p PROJECT -R repo -t "New title" --comment "Updated title"'
36
+ }
37
+ ]).action(async (number, opts, cmd) => {
38
+ await resolveOptions(cmd);
39
+ const { client } = await getClient(opts.space);
40
+ const prNumber = Number(number);
41
+ const notifiedUserId = opts.notify ?? [];
42
+ let issueId;
43
+ if (opts.issue) {
44
+ if (Number.isNaN(Number(opts.issue))) {
45
+ const issue = await client.getIssue(opts.issue);
46
+ issueId = issue.id;
47
+ } else {
48
+ issueId = Number(opts.issue);
49
+ }
50
+ }
51
+ const pullRequest = await client.patchPullRequest(opts.project, opts.repo, prNumber, {
52
+ summary: opts.title,
53
+ description: opts.body,
54
+ issueId,
55
+ assigneeId: opts.assignee ? await resolveUserId(client, opts.assignee) : void 0,
56
+ comment: opts.comment ?? void 0,
57
+ notifiedUserId
58
+ });
59
+ const json = opts.json === true ? "" : opts.json;
60
+ outputResult(pullRequest, { json }, (data) => {
61
+ consola.success(`Updated pull request #${data.number}: ${data.summary}`);
62
+ });
63
+ });
64
+
65
+ export { edit as default };
@@ -0,0 +1,52 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { a as resolveStdinArg } from '../shared/bee.C--ZWPxf.mjs';
9
+ import 'valibot';
10
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
11
+ import { j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
12
+ import '../shared/bee.XxOB1Her.mjs';
13
+ import 'node:stream/consumers';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.DVTuFf-T.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import '../shared/bee.-8tk76YJ.mjs';
21
+ import 'commander';
22
+ import 'consola/utils';
23
+
24
+ const edit = new BeeCommand("edit").summary("Edit a wiki page").description(
25
+ `Only specified fields are updated. When input is piped, it is used as the body automatically.`
26
+ ).argument("<wiki>", "Wiki page ID").option("-n, --name <name>", "New name of the wiki page").option("-b, --body <text>", "New content of the wiki page").option("--mail-notify", "Send notification email").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
27
+ {
28
+ description: "Update wiki page name",
29
+ command: 'bee wiki edit 12345 -n "New Name"'
30
+ },
31
+ {
32
+ description: "Update wiki page body",
33
+ command: 'bee wiki edit 12345 -b "New content"'
34
+ },
35
+ {
36
+ description: "Update body from stdin",
37
+ command: 'echo "New content" | bee wiki edit 12345'
38
+ }
39
+ ]).action(async (wiki, opts) => {
40
+ const { client } = await getClient(opts.space);
41
+ const content = await resolveStdinArg(opts.body);
42
+ const wikiData = await client.patchWiki(Number(wiki), {
43
+ name: opts.name,
44
+ content,
45
+ mailNotify: opts.mailNotify
46
+ });
47
+ outputResult(wikiData, opts, (data) => {
48
+ consola.success(`Updated wiki page ${data.id}: ${data.name}`);
49
+ });
50
+ });
51
+
52
+ export { edit as default };
@@ -0,0 +1,38 @@
1
+ import consola from 'consola';
2
+ import { g as getClient } from '../shared/bee.CThuQMit.mjs';
3
+ import 'backlog-js';
4
+ import 'node:http';
5
+ import 'open';
6
+ import 'node:child_process';
7
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
+ import { p as promptRequired } from '../shared/bee.DVTuFf-T.mjs';
9
+ import 'node:stream/consumers';
10
+ import 'valibot';
11
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.CQ3kBgas.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
13
+ import '../shared/bee.XxOB1Her.mjs';
14
+ import '../shared/bee.CktwmH8R.mjs';
15
+ import '../shared/bee.-8tk76YJ.mjs';
16
+ import 'node:fs';
17
+ import 'node:path';
18
+ import 'node:os';
19
+ import '../shared/bee.BeQSH2t0.mjs';
20
+ import 'commander';
21
+ import 'consola/utils';
22
+
23
+ const edit = new BeeCommand("edit").summary("Edit a category").description(`Renames the specified category.`).argument("<category>", "Category ID").addOption(project()).option("-n, --name <value>", "New name of the category").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
24
+ {
25
+ description: "Rename a category",
26
+ command: 'bee category edit 12345 -p PROJECT -n "New Name"'
27
+ }
28
+ ]).action(async (category, opts, cmd) => {
29
+ await resolveOptions(cmd);
30
+ const { client } = await getClient(opts.space);
31
+ const name = await promptRequired("Category name:", opts.name);
32
+ const result = await client.patchCategories(opts.project, Number(category), { name });
33
+ outputResult(result, opts, (data) => {
34
+ consola.success(`Updated category ${data.name} (ID: ${data.id})`);
35
+ });
36
+ });
37
+
38
+ export { edit as default };