@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,25 +1,24 @@
1
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';
2
+ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
+ import 'node:stream/consumers';
4
+ import * as v from 'valibot';
5
+ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
6
+ import { r as resolveUserId } from '../shared/bee.G4d7izLe.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
4
8
  import 'backlog-js';
5
9
  import 'node:http';
6
10
  import 'open';
7
11
  import 'node:child_process';
8
- import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
9
- import 'node:stream/consumers';
10
- import 'valibot';
11
12
  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';
13
+ import { p as project, B as repo, y as comment, t as notify, j as json, s as space, r as resolveOptions } from '../shared/bee.B4OxR0DJ.mjs';
14
14
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
15
+ import '../shared/bee.riolf-_Y.mjs';
16
+ import 'commander';
17
+ import 'consola/utils';
16
18
  import 'node:fs';
17
19
  import 'node:path';
18
20
  import 'node:os';
19
21
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import 'commander';
22
- import 'consola/utils';
23
22
 
24
23
  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
24
  {
@@ -37,15 +36,16 @@ const edit = new BeeCommand("edit").summary("Edit a pull request").description(`
37
36
  ]).action(async (number, opts, cmd) => {
38
37
  await resolveOptions(cmd);
39
38
  const { client } = await getClient(opts.space);
40
- const prNumber = Number(number);
39
+ const prNumber = parseArg(vInteger, number, "number");
41
40
  const notifiedUserId = opts.notify ?? [];
42
41
  let issueId;
43
42
  if (opts.issue) {
44
- if (Number.isNaN(Number(opts.issue))) {
43
+ const parsed = v.safeParse(vInteger, opts.issue);
44
+ if (parsed.success) {
45
+ issueId = parsed.output;
46
+ } else {
45
47
  const issue = await client.getIssue(opts.issue);
46
48
  issueId = issue.id;
47
- } else {
48
- issueId = Number(opts.issue);
49
49
  }
50
50
  }
51
51
  const pullRequest = await client.patchPullRequest(opts.project, opts.repo, prNumber, {
@@ -1,25 +1,24 @@
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 { a as resolveStdinArg } from '../shared/bee.C--ZWPxf.mjs';
4
+ import 'valibot';
5
+ import { p as parseArg, v as vInteger } from '../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 { a as resolveStdinArg } from '../shared/bee.C--ZWPxf.mjs';
9
- import 'valibot';
10
11
  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';
12
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
13
13
  import 'node:stream/consumers';
14
14
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
15
+ import '../shared/bee.riolf-_Y.mjs';
16
+ import 'commander';
17
+ import 'consola/utils';
16
18
  import 'node:fs';
17
19
  import 'node:path';
18
20
  import 'node:os';
19
21
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import 'commander';
22
- import 'consola/utils';
23
22
 
24
23
  const edit = new BeeCommand("edit").summary("Edit a wiki page").description(
25
24
  `Only specified fields are updated. When input is piped, it is used as the body automatically.`
@@ -39,7 +38,7 @@ const edit = new BeeCommand("edit").summary("Edit a wiki page").description(
39
38
  ]).action(async (wiki, opts) => {
40
39
  const { client } = await getClient(opts.space);
41
40
  const content = await resolveStdinArg(opts.body);
42
- const wikiData = await client.patchWiki(Number(wiki), {
41
+ const wikiData = await client.patchWiki(parseArg(vInteger, wiki, "wiki"), {
43
42
  name: opts.name,
44
43
  content,
45
44
  mailNotify: opts.mailNotify
@@ -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, a as promptRequired } 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 { 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
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 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([
@@ -29,7 +28,13 @@ const edit = new BeeCommand("edit").summary("Edit a category").description(`Rena
29
28
  await resolveOptions(cmd);
30
29
  const { client } = await getClient(opts.space);
31
30
  const name = await promptRequired("Category name:", opts.name);
32
- const result = await client.patchCategories(opts.project, Number(category), { name });
31
+ const result = await client.patchCategories(
32
+ opts.project,
33
+ parseArg(vInteger, category, "category"),
34
+ {
35
+ name
36
+ }
37
+ );
33
38
  outputResult(result, opts, (data) => {
34
39
  consola.success(`Updated category ${data.name} (ID: ${data.id})`);
35
40
  });
@@ -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 { p as parseArg, v as vInteger } from '../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 { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
12
- import '../shared/bee.XxOB1Her.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } 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 milestone").description(`Only specified fields are updated; others remain unchanged.`).argument("<milestone>", "Milestone ID").addOption(project()).requiredOption("-n, --name <value>", "New name of the milestone").option("-d, --description <value>", "New description of the milestone").option("--start-date <yyyy-MM-dd>", "New start date").option("--release-due-date <yyyy-MM-dd>", "New release due date").option("--archived", "Change whether the milestone is archived").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
24
23
  {
@@ -36,13 +35,17 @@ const edit = new BeeCommand("edit").summary("Edit a milestone").description(`Onl
36
35
  ]).action(async (milestone, opts, cmd) => {
37
36
  await resolveOptions(cmd);
38
37
  const { client } = await getClient(opts.space);
39
- const result = await client.patchVersions(opts.project, Number(milestone), {
40
- name: opts.name,
41
- description: opts.description,
42
- startDate: opts.startDate,
43
- releaseDueDate: opts.releaseDueDate,
44
- archived: opts.archived
45
- });
38
+ const result = await client.patchVersions(
39
+ opts.project,
40
+ parseArg(vInteger, milestone, "milestone"),
41
+ {
42
+ name: opts.name,
43
+ description: opts.description,
44
+ startDate: opts.startDate,
45
+ releaseDueDate: opts.releaseDueDate,
46
+ archived: opts.archived
47
+ }
48
+ );
46
49
  outputResult(result, opts, (data) => {
47
50
  consola.success(`Updated milestone ${data.name} (ID: ${data.id})`);
48
51
  });
@@ -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 { p as parseArg, v as vInteger } from '../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 { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
12
- import '../shared/bee.XxOB1Her.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } 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 an issue type").description(`Only specified fields are updated; others remain unchanged.`).argument("<issueType>", "Issue type ID").addOption(project()).option("-n, --name <value>", "New name of the issue type").option(
24
23
  "--color <value>",
@@ -35,10 +34,14 @@ const edit = new BeeCommand("edit").summary("Edit an issue type").description(`O
35
34
  ]).action(async (issueType, opts, cmd) => {
36
35
  await resolveOptions(cmd);
37
36
  const { client } = await getClient(opts.space);
38
- const result = await client.patchIssueType(opts.project, Number(issueType), {
39
- name: opts.name,
40
- color: opts.color
41
- });
37
+ const result = await client.patchIssueType(
38
+ opts.project,
39
+ parseArg(vInteger, issueType, "issueType"),
40
+ {
41
+ name: opts.name,
42
+ color: opts.color
43
+ }
44
+ );
42
45
  outputResult(result, opts, (data) => {
43
46
  consola.success(`Updated issue type ${data.name} (ID: ${data.id})`);
44
47
  });
@@ -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 { p as parseArg, v as vInteger } from '../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 { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.DHTPkjMh.mjs';
12
- import '../shared/bee.XxOB1Her.mjs';
12
+ import { p as project, j as json, s as space, r as resolveOptions } 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 status").description(`Only specified fields are updated; others remain unchanged.`).argument("<status>", "Status ID").addOption(project()).option("-n, --name <value>", "New name of the status").option(
24
23
  "--color <value>",
@@ -35,10 +34,14 @@ const edit = new BeeCommand("edit").summary("Edit a status").description(`Only s
35
34
  ]).action(async (status, opts, cmd) => {
36
35
  await resolveOptions(cmd);
37
36
  const { client } = await getClient(opts.space);
38
- const result = await client.patchProjectStatus(opts.project, Number(status), {
39
- name: opts.name,
40
- color: opts.color
41
- });
37
+ const result = await client.patchProjectStatus(
38
+ opts.project,
39
+ parseArg(vInteger, status, "status"),
40
+ {
41
+ name: opts.name,
42
+ color: opts.color
43
+ }
44
+ );
42
45
  outputResult(result, opts, (data) => {
43
46
  consola.success(`Updated status ${data.name} (ID: ${data.id})`);
44
47
  });
@@ -1,27 +1,26 @@
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 'open';
6
- import 'node:child_process';
7
2
  import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
8
3
  import 'node:stream/consumers';
9
- import 'valibot';
4
+ import * as v from 'valibot';
5
+ import { p as parseArg, v as vInteger } from '../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 'open';
12
+ import 'node:child_process';
12
13
  import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.CQ3kBgas.mjs';
13
- import { m as minId, l as maxId, b as count, o as order, j as json, s as space } from '../shared/bee.DHTPkjMh.mjs';
14
- import '../shared/bee.XxOB1Her.mjs';
14
+ import { z as minId, A as maxId, f as count, o as order, j as json, 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 'commander';
19
+ import 'consola/utils';
17
20
  import 'node:fs';
18
21
  import 'node:path';
19
22
  import 'node:os';
20
23
  import '../shared/bee.BeQSH2t0.mjs';
21
- import '../shared/bee.-8tk76YJ.mjs';
22
- import '../shared/bee.Ds2l-nTJ.mjs';
23
- import 'commander';
24
- import 'consola/utils';
25
24
 
26
25
  const history = new BeeCommand("history").summary("View wiki page history").description(`Shows version number, updater, and update date for each revision.`).argument("<wiki>", "Wiki page ID").addOption(minId()).addOption(maxId()).addOption(count()).addOption(order()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
27
26
  { description: "View wiki page history", command: "bee wiki history 12345" },
@@ -32,10 +31,10 @@ const history = new BeeCommand("history").summary("View wiki page history").desc
32
31
  { description: "Output as JSON", command: "bee wiki history 12345 --json" }
33
32
  ]).action(async (wiki, opts) => {
34
33
  const { client } = await getClient(opts.space);
35
- const histories = await client.getWikisHistory(Number(wiki), {
36
- minId: opts.minId ? Number(opts.minId) : void 0,
37
- maxId: opts.maxId ? Number(opts.maxId) : void 0,
38
- count: opts.count ? Number(opts.count) : void 0,
34
+ const histories = await client.getWikisHistory(parseArg(vInteger, wiki, "wiki"), {
35
+ minId: parseArg(v.optional(vInteger), opts.minId, "--min-id"),
36
+ maxId: parseArg(v.optional(vInteger), opts.maxId, "--max-id"),
37
+ count: parseArg(v.optional(vInteger), opts.count, "--count"),
39
38
  order: opts.order
40
39
  });
41
40
  outputResult(histories, opts, (data) => {
@@ -1,26 +1,25 @@
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 'open';
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 { p as printTable } from '../shared/bee.IM3QELRf.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
8
+ import 'backlog-js';
9
+ import 'node:http';
10
+ import 'open';
11
+ import 'node:child_process';
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';
13
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
14
+ import '../shared/bee.Ds2l-nTJ.mjs';
14
15
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
16
+ import '../shared/bee.riolf-_Y.mjs';
17
+ import 'commander';
18
+ import 'consola/utils';
16
19
  import 'node:fs';
17
20
  import 'node:path';
18
21
  import 'node:os';
19
22
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import '../shared/bee.Ds2l-nTJ.mjs';
22
- import 'commander';
23
- import 'consola/utils';
24
23
 
25
24
  const list = new BeeCommand("list").summary("List projects").description(
26
25
  `By default, only active (non-archived) projects are shown. Use \`--all\` to list all projects in the space (admin only).`
@@ -1,26 +1,25 @@
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 'open';
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 { p as printTable } from '../shared/bee.IM3QELRf.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
8
+ import 'backlog-js';
9
+ import 'node:http';
10
+ import 'open';
11
+ import 'node:child_process';
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';
13
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
14
+ import '../shared/bee.Ds2l-nTJ.mjs';
14
15
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
16
+ import '../shared/bee.riolf-_Y.mjs';
17
+ import 'commander';
18
+ import 'consola/utils';
16
19
  import 'node:fs';
17
20
  import 'node:path';
18
21
  import 'node:os';
19
22
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import '../shared/bee.Ds2l-nTJ.mjs';
22
- import 'commander';
23
- import 'consola/utils';
24
23
 
25
24
  const list = new BeeCommand("list").summary("List categories").description(`Categories help organize issues by grouping them into logical areas.`).argument("[project]", "Project ID or project key").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
26
25
  { description: "List all categories in a project", command: "bee category list PROJECT" },
@@ -1,26 +1,25 @@
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 'open';
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 { p as printTable } from '../shared/bee.IM3QELRf.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
8
+ import 'backlog-js';
9
+ import 'node:http';
10
+ import 'open';
11
+ import 'node:child_process';
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';
13
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
14
+ import '../shared/bee.Ds2l-nTJ.mjs';
14
15
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
16
+ import '../shared/bee.riolf-_Y.mjs';
17
+ import 'commander';
18
+ import 'consola/utils';
16
19
  import 'node:fs';
17
20
  import 'node:path';
18
21
  import 'node:os';
19
22
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import '../shared/bee.Ds2l-nTJ.mjs';
22
- import 'commander';
23
- import 'consola/utils';
24
23
 
25
24
  const list = new BeeCommand("list").summary("List milestones").description(
26
25
  `Milestones (versions) track release schedules and group issues by development cycle.`
@@ -1,26 +1,25 @@
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 'open';
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 { p as printTable } from '../shared/bee.IM3QELRf.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
8
+ import 'backlog-js';
9
+ import 'node:http';
10
+ import 'open';
11
+ import 'node:child_process';
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';
13
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
14
+ import '../shared/bee.Ds2l-nTJ.mjs';
14
15
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
16
+ import '../shared/bee.riolf-_Y.mjs';
17
+ import 'commander';
18
+ import 'consola/utils';
16
19
  import 'node:fs';
17
20
  import 'node:path';
18
21
  import 'node:os';
19
22
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import '../shared/bee.Ds2l-nTJ.mjs';
22
- import 'commander';
23
- import 'consola/utils';
24
23
 
25
24
  const list = new BeeCommand("list").summary("List issue types").description(`Issue types categorize issues and are displayed with their associated color.`).argument("[project]", "Project ID or project key").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
26
25
  { description: "List all issue types", command: "bee issue-type list PROJECT" },
@@ -1,26 +1,25 @@
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 'open';
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 { p as printTable } from '../shared/bee.IM3QELRf.mjs';
7
+ import { g as getClient } from '../shared/bee.BCBBmkOy.mjs';
8
+ import 'backlog-js';
9
+ import 'node:http';
10
+ import 'open';
11
+ import 'node:child_process';
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';
13
+ import { j as json, s as space } from '../shared/bee.B4OxR0DJ.mjs';
14
+ import '../shared/bee.Ds2l-nTJ.mjs';
14
15
  import '../shared/bee.CktwmH8R.mjs';
15
- import '../shared/bee.DVTuFf-T.mjs';
16
+ import '../shared/bee.riolf-_Y.mjs';
17
+ import 'commander';
18
+ import 'consola/utils';
16
19
  import 'node:fs';
17
20
  import 'node:path';
18
21
  import 'node:os';
19
22
  import '../shared/bee.BeQSH2t0.mjs';
20
- import '../shared/bee.-8tk76YJ.mjs';
21
- import '../shared/bee.Ds2l-nTJ.mjs';
22
- import 'commander';
23
- import 'consola/utils';
24
23
 
25
24
  const list = new BeeCommand("list").summary("List statuses").description(`Statuses define the workflow states that issues move through.`).argument("[project]", "Project ID or project key").addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
26
25
  { description: "List all statuses", command: "bee status list PROJECT" },
@@ -1,27 +1,26 @@
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 'open';
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 { p as parseArg, v as vInteger } from '../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 'open';
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, s as space } from '../shared/bee.DHTPkjMh.mjs';
14
- import '../shared/bee.XxOB1Her.mjs';
14
+ import { j as json, 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 'commander';
19
+ import 'consola/utils';
17
20
  import 'node:fs';
18
21
  import 'node:path';
19
22
  import 'node:os';
20
23
  import '../shared/bee.BeQSH2t0.mjs';
21
- import '../shared/bee.-8tk76YJ.mjs';
22
- import '../shared/bee.Ds2l-nTJ.mjs';
23
- import 'commander';
24
- import 'consola/utils';
25
24
 
26
25
  const list = new BeeCommand("list").summary("List received stars").description(`Defaults to the authenticated user if no user ID is given.`).argument("[user]", "User ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
27
26
  { description: "List your stars", command: "bee star list" },
@@ -31,7 +30,7 @@ const list = new BeeCommand("list").summary("List received stars").description(`
31
30
  const { client } = await getClient(opts.space);
32
31
  let userId;
33
32
  if (user) {
34
- userId = Number(user);
33
+ userId = parseArg(vInteger, user, "user");
35
34
  } else {
36
35
  const myself = await client.getMyself();
37
36
  userId = myself.id;