@nulab/bee 1.0.0-rc.0 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/chunks/activities.mjs +13 -14
  2. package/dist/chunks/activities2.mjs +16 -17
  3. package/dist/chunks/activities3.mjs +15 -16
  4. package/dist/chunks/add-user.mjs +10 -14
  5. package/dist/chunks/add.mjs +15 -14
  6. package/dist/chunks/add2.mjs +9 -10
  7. package/dist/chunks/api.mjs +14 -13
  8. package/dist/chunks/attachments.mjs +11 -12
  9. package/dist/chunks/attachments2.mjs +11 -12
  10. package/dist/chunks/attachments3.mjs +12 -13
  11. package/dist/chunks/browse.mjs +10 -11
  12. package/dist/chunks/clone.mjs +9 -10
  13. package/dist/chunks/close.mjs +10 -11
  14. package/dist/chunks/comment.mjs +14 -13
  15. package/dist/chunks/comment2.mjs +12 -13
  16. package/dist/chunks/comments.mjs +14 -15
  17. package/dist/chunks/completion.mjs +1 -1
  18. package/dist/chunks/count.mjs +7 -8
  19. package/dist/chunks/count2.mjs +9 -10
  20. package/dist/chunks/count3.mjs +10 -11
  21. package/dist/chunks/count4.mjs +9 -10
  22. package/dist/chunks/count5.mjs +10 -11
  23. package/dist/chunks/create.mjs +9 -10
  24. package/dist/chunks/create2.mjs +18 -13
  25. package/dist/chunks/create3.mjs +10 -11
  26. package/dist/chunks/create4.mjs +14 -14
  27. package/dist/chunks/create5.mjs +10 -11
  28. package/dist/chunks/create6.mjs +9 -10
  29. package/dist/chunks/create7.mjs +9 -10
  30. package/dist/chunks/create8.mjs +9 -10
  31. package/dist/chunks/create9.mjs +9 -10
  32. package/dist/chunks/dashboard.mjs +12 -13
  33. package/dist/chunks/delete.mjs +8 -9
  34. package/dist/chunks/delete2.mjs +8 -9
  35. package/dist/chunks/delete3.mjs +8 -9
  36. package/dist/chunks/delete4.mjs +12 -10
  37. package/dist/chunks/delete5.mjs +12 -10
  38. package/dist/chunks/delete6.mjs +12 -10
  39. package/dist/chunks/delete7.mjs +19 -12
  40. package/dist/chunks/delete8.mjs +10 -11
  41. package/dist/chunks/delete9.mjs +9 -10
  42. package/dist/chunks/edit.mjs +9 -10
  43. package/dist/chunks/edit2.mjs +23 -18
  44. package/dist/chunks/edit3.mjs +15 -15
  45. package/dist/chunks/edit4.mjs +10 -11
  46. package/dist/chunks/edit5.mjs +15 -10
  47. package/dist/chunks/edit6.mjs +20 -17
  48. package/dist/chunks/edit7.mjs +17 -14
  49. package/dist/chunks/edit8.mjs +17 -14
  50. package/dist/chunks/history.mjs +16 -17
  51. package/dist/chunks/list.mjs +11 -12
  52. package/dist/chunks/list10.mjs +11 -12
  53. package/dist/chunks/list11.mjs +11 -12
  54. package/dist/chunks/list12.mjs +11 -12
  55. package/dist/chunks/list13.mjs +11 -12
  56. package/dist/chunks/list14.mjs +12 -13
  57. package/dist/chunks/list15.mjs +11 -12
  58. package/dist/chunks/list2.mjs +29 -16
  59. package/dist/chunks/list3.mjs +19 -20
  60. package/dist/chunks/list4.mjs +15 -16
  61. package/dist/chunks/list5.mjs +15 -16
  62. package/dist/chunks/list6.mjs +11 -12
  63. package/dist/chunks/list7.mjs +14 -15
  64. package/dist/chunks/list8.mjs +11 -12
  65. package/dist/chunks/list9.mjs +11 -12
  66. package/dist/chunks/login.mjs +27 -26
  67. package/dist/chunks/logout.mjs +3 -4
  68. package/dist/chunks/me.mjs +12 -13
  69. package/dist/chunks/read-all.mjs +8 -9
  70. package/dist/chunks/read.mjs +9 -10
  71. package/dist/chunks/read2.mjs +9 -10
  72. package/dist/chunks/refresh.mjs +3 -4
  73. package/dist/chunks/remove-user.mjs +10 -14
  74. package/dist/chunks/remove.mjs +9 -10
  75. package/dist/chunks/reopen.mjs +9 -10
  76. package/dist/chunks/status.mjs +3 -4
  77. package/dist/chunks/status2.mjs +9 -10
  78. package/dist/chunks/status3.mjs +9 -10
  79. package/dist/chunks/switch.mjs +2 -3
  80. package/dist/chunks/tags.mjs +9 -10
  81. package/dist/chunks/token.mjs +3 -4
  82. package/dist/chunks/tree.mjs +9 -10
  83. package/dist/chunks/users.mjs +11 -12
  84. package/dist/chunks/view.mjs +12 -13
  85. package/dist/chunks/view2.mjs +12 -13
  86. package/dist/chunks/view3.mjs +12 -13
  87. package/dist/chunks/view4.mjs +13 -14
  88. package/dist/chunks/view5.mjs +12 -13
  89. package/dist/chunks/view6.mjs +12 -13
  90. package/dist/chunks/view7.mjs +13 -14
  91. package/dist/chunks/view8.mjs +14 -15
  92. package/dist/chunks/view9.mjs +12 -13
  93. package/dist/index.mjs +4 -3
  94. package/dist/shared/{bee.DVTuFf-T.mjs → bee.B4OxR0DJ.mjs} +50 -2
  95. package/dist/shared/{bee.CThuQMit.mjs → bee.BCBBmkOy.mjs} +6 -5
  96. package/dist/shared/bee.BYqxm3yG.mjs +24 -0
  97. package/dist/shared/bee.G4d7izLe.mjs +14 -0
  98. package/dist/shared/{bee.sHWg0IFT.mjs → bee.PF8hrVKn.mjs} +8 -3
  99. package/dist/shared/{bee.-8tk76YJ.mjs → bee.riolf-_Y.mjs} +1 -1
  100. package/package.json +4 -5
  101. package/dist/shared/bee.ChBdZ0cH.mjs +0 -9
  102. package/dist/shared/bee.DHTPkjMh.mjs +0 -48
  103. package/dist/shared/bee.XxOB1Her.mjs +0 -8
@@ -1,24 +1,23 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, a as promptRequired } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import { m as milestoneUrl } from '../shared/bee.CzKcWSES.mjs';
6
11
  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
12
  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 'open';
17
13
  import 'node:fs';
18
14
  import 'node:path';
19
15
  import 'node:os';
20
16
  import '../shared/bee.BeQSH2t0.mjs';
21
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
20
+ import 'open';
22
21
  import 'consola/utils';
23
22
 
24
23
  const create = new BeeCommand("create").summary("Create a milestone").description(`Omitted fields will be prompted interactively.`).addOption(project()).option("-n, --name <value>", "Milestone name").option("-d, --description <value>", "Milestone description").option("--start-date <yyyy-MM-dd>", "Start date").option("--release-due-date <yyyy-MM-dd>", "Release due date").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
@@ -1,24 +1,23 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, a as promptRequired } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import { k as issueTypeUrl } from '../shared/bee.CzKcWSES.mjs';
6
11
  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
12
  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 'open';
17
13
  import 'node:fs';
18
14
  import 'node:path';
19
15
  import 'node:os';
20
16
  import '../shared/bee.BeQSH2t0.mjs';
21
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
20
+ import 'open';
22
21
  import 'consola/utils';
23
22
 
24
23
  const create = new BeeCommand("create").summary("Create an issue type").description(`Omitted fields will be prompted interactively.`).addOption(project()).option("-n, --name <value>", "Issue type name").requiredOption(
@@ -1,24 +1,23 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, a as promptRequired } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import { s as statusUrl } from '../shared/bee.CzKcWSES.mjs';
6
11
  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
12
  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 'open';
17
13
  import 'node:fs';
18
14
  import 'node:path';
19
15
  import 'node:os';
20
16
  import '../shared/bee.BeQSH2t0.mjs';
21
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
20
+ import 'open';
22
21
  import 'consola/utils';
23
22
 
24
23
  const create = new BeeCommand("create").summary("Create a status").description(`Omitted fields will be prompted interactively.`).addOption(project()).option("-n, --name <value>", "Status name").requiredOption(
@@ -1,28 +1,27 @@
1
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 { o as openOrPrintUrl, d as dashboardUrl } from '../shared/bee.CzKcWSES.mjs';
6
- import 'node:child_process';
7
2
  import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
3
  import 'node:stream/consumers';
9
4
  import 'valibot';
5
+ import '../shared/bee.BYqxm3yG.mjs';
10
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
11
7
  import { p as printTable } from '../shared/bee.IM3QELRf.mjs';
8
+ import { g as getClient } from '../shared/bee.BCBBmkOy.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';
12
13
  import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
13
- import { j as json, w as web, n as noBrowser, s as space } from '../shared/bee.DHTPkjMh.mjs';
14
- import '../shared/bee.XxOB1Her.mjs';
14
+ import { j as json, w as web, n as noBrowser, s as space } from '../shared/bee.B4OxR0DJ.mjs';
15
+ import '../shared/bee.Ds2l-nTJ.mjs';
15
16
  import '../shared/bee.CktwmH8R.mjs';
16
- import '../shared/bee.DVTuFf-T.mjs';
17
+ import '../shared/bee.riolf-_Y.mjs';
18
+ import 'open';
19
+ import 'commander';
20
+ import 'consola/utils';
17
21
  import 'node:fs';
18
22
  import 'node:path';
19
23
  import 'node:os';
20
24
  import '../shared/bee.BeQSH2t0.mjs';
21
- import '../shared/bee.-8tk76YJ.mjs';
22
- import 'open';
23
- import '../shared/bee.Ds2l-nTJ.mjs';
24
- import 'commander';
25
- import 'consola/utils';
26
25
 
27
26
  const dashboard = new BeeCommand("dashboard").summary("Show a summary of your Backlog activity").description(
28
27
  `Displays assigned issues, unread notifications, and projects. Use \`--web\` to open in the browser.`
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { j as json, s as space, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } 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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  const deleteProject = new BeeCommand("delete").summary("Delete a project").description(`This action is irreversible. Requires Administrator role.`).argument("<project>", "Project ID or project key").option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { j as json, s as space, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  const deleteIssue = new BeeCommand("delete").summary("Delete an issue").description(`This action is irreversible.`).argument("<issue>", "Issue ID or issue key").option("-y, --yes", "Skip confirmation prompt").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { j as json, s as space, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  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([
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { j as json, s as space, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  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([
@@ -38,7 +37,10 @@ const deleteWiki = new BeeCommand("delete").summary("Delete a wiki page").descri
38
37
  return;
39
38
  }
40
39
  const { client } = await getClient(opts.space);
41
- const wikiData = await client.deleteWiki(Number(wiki), opts.mailNotify ?? false);
40
+ const wikiData = await client.deleteWiki(
41
+ parseArg(vInteger, wiki, "wiki"),
42
+ opts.mailNotify ?? false
43
+ );
42
44
  outputResult(wikiData, opts, (data) => {
43
45
  consola.success(`Deleted wiki page ${data.id}: ${data.name}`);
44
46
  });
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  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([
@@ -39,7 +38,10 @@ const deleteCategory = new BeeCommand("delete").summary("Delete a category").des
39
38
  return;
40
39
  }
41
40
  const { client } = await getClient(opts.space);
42
- const result = await client.deleteCategories(opts.project, Number(category));
41
+ const result = await client.deleteCategories(
42
+ opts.project,
43
+ parseArg(vInteger, category, "category")
44
+ );
43
45
  outputResult(result, opts, (data) => {
44
46
  consola.success(`Deleted category ${data.name} (ID: ${data.id})`);
45
47
  });
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  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([
@@ -39,7 +38,10 @@ const deleteMilestone = new BeeCommand("delete").summary("Delete a milestone").d
39
38
  return;
40
39
  }
41
40
  const { client } = await getClient(opts.space);
42
- const result = await client.deleteVersions(opts.project, Number(milestone));
41
+ const result = await client.deleteVersions(
42
+ opts.project,
43
+ parseArg(vInteger, milestone, "milestone")
44
+ );
43
45
  outputResult(result, opts, (data) => {
44
46
  consola.success(`Deleted milestone ${data.name} (ID: ${data.id})`);
45
47
  });
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  const deleteIssueType = new BeeCommand("delete").summary("Delete an issue type").description(
@@ -44,9 +43,17 @@ const deleteIssueType = new BeeCommand("delete").summary("Delete an issue type")
44
43
  return;
45
44
  }
46
45
  const { client } = await getClient(opts.space);
47
- const result = await client.deleteIssueType(opts.project, Number(issueType), {
48
- substituteIssueTypeId: Number(opts.substituteIssueTypeId)
49
- });
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
+ );
50
57
  outputResult(result, opts, (data) => {
51
58
  consola.success(`Deleted issue type ${data.name} (ID: ${data.id})`);
52
59
  });
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { p as project, j as json, s as space, r as resolveOptions, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  const deleteStatus = new BeeCommand("delete").summary("Delete a status").description(
@@ -43,8 +42,8 @@ const deleteStatus = new BeeCommand("delete").summary("Delete a status").descrip
43
42
  const { client } = await getClient(opts.space);
44
43
  const result = await client.deleteProjectStatus(
45
44
  opts.project,
46
- Number(status),
47
- Number(opts.substituteStatusId)
45
+ parseArg(vInteger, status, "status"),
46
+ parseArg(vInteger, opts.substituteStatusId, "--substitute-status-id")
48
47
  );
49
48
  outputResult(result, opts, (data) => {
50
49
  consola.success(`Deleted status ${data.name} (ID: ${data.id})`);
@@ -1,23 +1,22 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import { j as json, s as space, d as confirmOrExit } from '../shared/bee.B4OxR0DJ.mjs';
4
+ import 'node:stream/consumers';
5
+ import 'valibot';
6
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
8
  import 'backlog-js';
4
9
  import 'node:http';
5
10
  import 'open';
6
11
  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
12
  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
13
  import 'node:fs';
17
14
  import 'node:path';
18
15
  import 'node:os';
19
16
  import '../shared/bee.BeQSH2t0.mjs';
20
17
  import 'commander';
18
+ import '../shared/bee.CktwmH8R.mjs';
19
+ import '../shared/bee.riolf-_Y.mjs';
21
20
  import 'consola/utils';
22
21
 
23
22
  const deleteWatching = new BeeCommand("delete").summary("Delete a watching item").description(
@@ -40,7 +39,7 @@ const deleteWatching = new BeeCommand("delete").summary("Delete a watching item"
40
39
  return;
41
40
  }
42
41
  const { client } = await getClient(opts.space);
43
- const result = await client.deletehWatchingListItem(Number(watching));
42
+ const result = await client.deletehWatchingListItem(parseArg(vInteger, watching, "watching"));
44
43
  outputResult(result, opts, (data) => {
45
44
  consola.success(`Deleted watching ${data.id}.`);
46
45
  });
@@ -1,24 +1,23 @@
1
1
  import consola from 'consola';
2
- import { g as getClient } from '../shared/bee.CThuQMit.mjs';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import 'node:stream/consumers';
4
+ import 'valibot';
5
+ import '../shared/bee.BYqxm3yG.mjs';
6
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
3
7
  import 'backlog-js';
4
8
  import 'node:http';
5
9
  import 'open';
6
10
  import 'node:child_process';
7
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
- import 'node:stream/consumers';
9
- import 'valibot';
10
11
  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';
12
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
13
13
  import '../shared/bee.CktwmH8R.mjs';
14
- import '../shared/bee.DVTuFf-T.mjs';
14
+ import '../shared/bee.riolf-_Y.mjs';
15
+ import 'commander';
16
+ import 'consola/utils';
15
17
  import 'node:fs';
16
18
  import 'node:path';
17
19
  import 'node:os';
18
20
  import '../shared/bee.BeQSH2t0.mjs';
19
- import '../shared/bee.-8tk76YJ.mjs';
20
- import 'commander';
21
- import 'consola/utils';
22
21
 
23
22
  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
23
  "--project-leader-can-edit-project-leader",
@@ -1,28 +1,27 @@
1
1
  import consola from 'consola';
2
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';
3
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
4
+ import 'node:stream/consumers';
5
+ import * as v from 'valibot';
6
+ import { p as parseArg, a as vFiniteNumber, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
7
+ import { r as resolveUserId } from '../shared/bee.G4d7izLe.mjs';
8
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
5
9
  import 'backlog-js';
6
10
  import 'node:http';
7
11
  import 'open';
8
12
  import 'node:child_process';
9
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
10
- import 'node:stream/consumers';
11
- import 'valibot';
12
13
  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';
14
+ import { m as category, v as version, q as milestone, y as comment, t as notify, x as attachment, j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
15
15
  import '../shared/bee.CktwmH8R.mjs';
16
- import '../shared/bee.DVTuFf-T.mjs';
16
+ import '../shared/bee.riolf-_Y.mjs';
17
+ import 'commander';
18
+ import 'consola/utils';
17
19
  import 'node:fs';
18
20
  import 'node:path';
19
21
  import 'node:os';
20
22
  import '../shared/bee.BeQSH2t0.mjs';
21
- import '../shared/bee.-8tk76YJ.mjs';
22
- import 'commander';
23
- import 'consola/utils';
24
23
 
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([
24
+ const edit = new BeeCommand("edit").summary("Edit an issue").description(`Only specified fields are updated; others remain unchanged.`).argument("<issue>", "Issue ID or issue key").option("-t, --title <text>", "New title of the issue").option("-d, --description <text>", "New description of the issue").option("-S, --status <id>", "New status ID").option("-P, --priority <name>", `Change priority`).option("-T, --type <id>", "New issue type ID").option("--assignee <id>", "New assignee user ID. Use @me for yourself.").addOption(category()).addOption(version()).addOption(milestone()).option("--resolution <id>", "Resolution ID").option("--parent-issue <id>", "New parent issue ID").option("--start-date <date>", "New start date").option("--due-date <date>", "New due date").option("--estimated-hours <n>", "New estimated hours").option("--actual-hours <n>", "New actual hours").addOption(comment()).addOption(notify()).addOption(attachment()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
26
25
  {
27
26
  description: "Update issue title",
28
27
  command: 'bee issue edit PROJECT-123 -t "New title"'
@@ -37,6 +36,9 @@ const edit = new BeeCommand("edit").summary("Edit an issue").description(`Only s
37
36
  }
38
37
  ]).action(async (issue, opts) => {
39
38
  const { client } = await getClient(opts.space);
39
+ const categoryId = opts.category ?? [];
40
+ const versionId = opts.version ?? [];
41
+ const milestoneId = opts.milestone ?? [];
40
42
  const notifiedUserId = opts.notify ?? [];
41
43
  const attachmentId = opts.attachment ?? [];
42
44
  let priorityId;
@@ -51,16 +53,19 @@ const edit = new BeeCommand("edit").summary("Edit an issue").description(`Only s
51
53
  const issueData = await client.patchIssue(issue, {
52
54
  summary: opts.title,
53
55
  description: opts.description,
54
- statusId: opts.status ? Number(opts.status) : void 0,
56
+ statusId: parseArg(v.optional(vInteger), opts.status, "--status"),
55
57
  priorityId,
56
- issueTypeId: opts.type ? Number(opts.type) : void 0,
58
+ issueTypeId: parseArg(v.optional(vInteger), opts.type, "--type"),
57
59
  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
+ categoryId,
61
+ versionId,
62
+ milestoneId,
63
+ resolutionId: parseArg(v.optional(vInteger), opts.resolution, "--resolution"),
64
+ parentIssueId: parseArg(v.optional(vInteger), opts.parentIssue, "--parent-issue"),
60
65
  startDate: opts.startDate,
61
66
  dueDate: opts.dueDate,
62
- estimatedHours: opts.estimatedHours ? Number(opts.estimatedHours) : void 0,
63
- actualHours: opts.actualHours ? Number(opts.actualHours) : void 0,
67
+ estimatedHours: parseArg(v.optional(vFiniteNumber), opts.estimatedHours, "--estimated-hours"),
68
+ actualHours: parseArg(v.optional(vFiniteNumber), opts.actualHours, "--actual-hours"),
64
69
  comment: opts.comment,
65
70
  notifiedUserId,
66
71
  attachmentId