@nulab/bee 1.0.0 → 1.1.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 (121) hide show
  1. package/dist/chunks/activities.mjs +9 -24
  2. package/dist/chunks/activities2.mjs +9 -24
  3. package/dist/chunks/activities3.mjs +9 -24
  4. package/dist/chunks/add-user.mjs +6 -6
  5. package/dist/chunks/add.mjs +6 -6
  6. package/dist/chunks/add2.mjs +6 -6
  7. package/dist/chunks/api.mjs +48 -13
  8. package/dist/chunks/attachments.mjs +8 -8
  9. package/dist/chunks/attachments2.mjs +8 -8
  10. package/dist/chunks/attachments3.mjs +8 -8
  11. package/dist/chunks/browse.mjs +7 -7
  12. package/dist/chunks/clone.mjs +6 -6
  13. package/dist/chunks/close.mjs +6 -6
  14. package/dist/chunks/comment.mjs +8 -8
  15. package/dist/chunks/comment2.mjs +8 -8
  16. package/dist/chunks/comments.mjs +6 -6
  17. package/dist/chunks/completion.mjs +1 -1
  18. package/dist/chunks/count.mjs +8 -13
  19. package/dist/chunks/count2.mjs +6 -6
  20. package/dist/chunks/count3.mjs +6 -6
  21. package/dist/chunks/count4.mjs +6 -6
  22. package/dist/chunks/count5.mjs +6 -6
  23. package/dist/chunks/create.mjs +6 -6
  24. package/dist/chunks/create2.mjs +8 -8
  25. package/dist/chunks/create3.mjs +7 -7
  26. package/dist/chunks/create4.mjs +6 -6
  27. package/dist/chunks/create5.mjs +7 -7
  28. package/dist/chunks/create6.mjs +6 -6
  29. package/dist/chunks/create7.mjs +6 -6
  30. package/dist/chunks/create8.mjs +6 -6
  31. package/dist/chunks/create9.mjs +6 -6
  32. package/dist/chunks/dashboard.mjs +8 -8
  33. package/dist/chunks/delete.mjs +6 -6
  34. package/dist/chunks/delete2.mjs +6 -6
  35. package/dist/chunks/delete3.mjs +6 -6
  36. package/dist/chunks/delete4.mjs +6 -6
  37. package/dist/chunks/delete5.mjs +6 -6
  38. package/dist/chunks/delete6.mjs +6 -6
  39. package/dist/chunks/delete7.mjs +6 -6
  40. package/dist/chunks/delete8.mjs +6 -6
  41. package/dist/chunks/delete9.mjs +6 -6
  42. package/dist/chunks/edit.mjs +6 -6
  43. package/dist/chunks/edit2.mjs +6 -6
  44. package/dist/chunks/edit3.mjs +6 -6
  45. package/dist/chunks/edit4.mjs +6 -6
  46. package/dist/chunks/edit5.mjs +6 -6
  47. package/dist/chunks/edit6.mjs +6 -6
  48. package/dist/chunks/edit7.mjs +6 -6
  49. package/dist/chunks/edit8.mjs +6 -6
  50. package/dist/chunks/history.mjs +8 -8
  51. package/dist/chunks/index.mjs +1 -1
  52. package/dist/chunks/index10.mjs +1 -1
  53. package/dist/chunks/index11.mjs +1 -1
  54. package/dist/chunks/index12.mjs +1 -1
  55. package/dist/chunks/index13.mjs +1 -1
  56. package/dist/chunks/index14.mjs +1 -1
  57. package/dist/chunks/index15.mjs +1 -1
  58. package/dist/chunks/index16.mjs +1 -1
  59. package/dist/chunks/index17.mjs +1 -1
  60. package/dist/chunks/index2.mjs +1 -1
  61. package/dist/chunks/index3.mjs +1 -1
  62. package/dist/chunks/index4.mjs +1 -1
  63. package/dist/chunks/index5.mjs +1 -1
  64. package/dist/chunks/index6.mjs +1 -1
  65. package/dist/chunks/index7.mjs +1 -1
  66. package/dist/chunks/index8.mjs +1 -1
  67. package/dist/chunks/index9.mjs +1 -1
  68. package/dist/chunks/list.mjs +8 -8
  69. package/dist/chunks/list10.mjs +8 -8
  70. package/dist/chunks/list11.mjs +8 -8
  71. package/dist/chunks/list12.mjs +8 -8
  72. package/dist/chunks/list13.mjs +8 -8
  73. package/dist/chunks/list14.mjs +8 -8
  74. package/dist/chunks/list15.mjs +8 -8
  75. package/dist/chunks/list2.mjs +10 -15
  76. package/dist/chunks/list3.mjs +8 -8
  77. package/dist/chunks/list4.mjs +8 -8
  78. package/dist/chunks/list5.mjs +8 -8
  79. package/dist/chunks/list6.mjs +8 -8
  80. package/dist/chunks/list7.mjs +8 -8
  81. package/dist/chunks/list8.mjs +8 -8
  82. package/dist/chunks/list9.mjs +8 -8
  83. package/dist/chunks/login.mjs +19 -8
  84. package/dist/chunks/logout.mjs +4 -4
  85. package/dist/chunks/me.mjs +8 -8
  86. package/dist/chunks/read-all.mjs +6 -6
  87. package/dist/chunks/read.mjs +6 -6
  88. package/dist/chunks/read2.mjs +6 -6
  89. package/dist/chunks/refresh.mjs +5 -5
  90. package/dist/chunks/remove-user.mjs +6 -6
  91. package/dist/chunks/remove.mjs +6 -6
  92. package/dist/chunks/reopen.mjs +6 -6
  93. package/dist/chunks/status.mjs +5 -5
  94. package/dist/chunks/status2.mjs +6 -6
  95. package/dist/chunks/status3.mjs +6 -6
  96. package/dist/chunks/switch.mjs +3 -3
  97. package/dist/chunks/tags.mjs +6 -6
  98. package/dist/chunks/token.mjs +4 -4
  99. package/dist/chunks/tree.mjs +6 -6
  100. package/dist/chunks/users.mjs +8 -8
  101. package/dist/chunks/view.mjs +8 -8
  102. package/dist/chunks/view2.mjs +8 -8
  103. package/dist/chunks/view3.mjs +9 -9
  104. package/dist/chunks/view4.mjs +8 -8
  105. package/dist/chunks/view5.mjs +8 -8
  106. package/dist/chunks/view6.mjs +8 -8
  107. package/dist/chunks/view7.mjs +8 -8
  108. package/dist/chunks/view8.mjs +8 -8
  109. package/dist/chunks/view9.mjs +8 -8
  110. package/dist/index.mjs +8 -7
  111. package/dist/shared/{bee.Bt1TK6yh.mjs → bee.B3N0WBdU.mjs} +46 -6
  112. package/dist/shared/{bee.BeQSH2t0.mjs → bee.BImw1HZl.mjs} +6 -3
  113. package/dist/shared/{bee.D6yQ6Pqf.mjs → bee.C4p7W8_P.mjs} +1 -1
  114. package/dist/shared/{bee.CCNmDHVv.mjs → bee.CirccSk2.mjs} +19 -1
  115. package/dist/shared/{bee.Ds2l-nTJ.mjs → bee.DFnSWb6q.mjs} +101 -13
  116. package/dist/shared/{bee.OJ0vqxJN.mjs → bee.DessOtkV.mjs} +10 -3
  117. package/dist/shared/{bee.DxRKWv6n.mjs → bee.DfqnFet4.mjs} +1 -1
  118. package/dist/shared/{bee.bmiIlr9W.mjs → bee.KteAW2rM.mjs} +12 -2
  119. package/dist/shared/{bee.IM3QELRf.mjs → bee.a05kNWpn.mjs} +1 -1
  120. package/dist/shared/{bee.BtxMsVL4.mjs → bee.x-FvgDW2.mjs} +3230 -674
  121. package/package.json +9 -9
@@ -4,18 +4,19 @@ import { U as UserError } from '../shared/bee.BYqxm3yG.mjs';
4
4
  import 'node:stream/consumers';
5
5
  import 'valibot';
6
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
8
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
7
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
8
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
9
9
  import 'backlog-js';
10
10
  import 'node:http';
11
11
  import { f as documentUrl, o as openOrPrintUrl } from '../shared/bee.CzKcWSES.mjs';
12
12
  import 'node:child_process';
13
- import '../shared/bee.BtxMsVL4.mjs';
14
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.bmiIlr9W.mjs';
15
- import { w as web, n as noBrowser, j as json, s as space } from '../shared/bee.Bt1TK6yh.mjs';
16
- import '../shared/bee.Ds2l-nTJ.mjs';
13
+ import '../shared/bee.x-FvgDW2.mjs';
14
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
15
+ import { p as projectOptional, w as web, n as noBrowser, j as json, s as space } from '../shared/bee.B3N0WBdU.mjs';
16
+ import '../shared/bee.DFnSWb6q.mjs';
17
17
  import '../shared/bee.CktwmH8R.mjs';
18
- import '../shared/bee.DxRKWv6n.mjs';
18
+ import '../shared/bee.DfqnFet4.mjs';
19
+ import '../shared/bee.BImw1HZl.mjs';
19
20
  import 'open';
20
21
  import 'node:module';
21
22
  import 'commander';
@@ -23,9 +24,8 @@ import 'consola/utils';
23
24
  import 'node:fs';
24
25
  import 'node:path';
25
26
  import 'node:os';
26
- import '../shared/bee.BeQSH2t0.mjs';
27
27
 
28
- const view = new BeeCommand("view").summary("View a document").description(`Use \`--web\` to open in the browser (\`--project\` is required for \`--web\`).`).argument("<document>", "Document ID").option("-p, --project <id>", "Project ID or project key (required for --web)").addOption(web("document")).addOption(noBrowser()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
28
+ const view = new BeeCommand("view").summary("View a document").description(`Use \`--web\` to open in the browser (\`--project\` is required for \`--web\`).`).argument("<document>", "Document ID").addOption(projectOptional("Project ID or project key (required for --web)")).addOption(web("document")).addOption(noBrowser()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
29
29
  { description: "View document details", command: "bee document view 12345" },
30
30
  {
31
31
  description: "Open document in browser",
@@ -4,18 +4,19 @@ import 'node:stream/consumers';
4
4
  import 'valibot';
5
5
  import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
6
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
8
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
7
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
8
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
9
9
  import 'backlog-js';
10
10
  import 'node:http';
11
11
  import { h as pullRequestUrl, o as openOrPrintUrl } from '../shared/bee.CzKcWSES.mjs';
12
12
  import 'node:child_process';
13
- import '../shared/bee.BtxMsVL4.mjs';
14
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT, b as ENV_REPO } from '../shared/bee.bmiIlr9W.mjs';
15
- import { p as project, B as repo, w as web, n as noBrowser, j as json, s as space, r as resolveOptions } from '../shared/bee.Bt1TK6yh.mjs';
16
- import '../shared/bee.Ds2l-nTJ.mjs';
13
+ import '../shared/bee.x-FvgDW2.mjs';
14
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT, b as ENV_REPO } from '../shared/bee.KteAW2rM.mjs';
15
+ import { d as project, C as repo, w as web, n as noBrowser, j as json, s as space, r as resolveOptions } from '../shared/bee.B3N0WBdU.mjs';
16
+ import '../shared/bee.DFnSWb6q.mjs';
17
17
  import '../shared/bee.CktwmH8R.mjs';
18
- import '../shared/bee.DxRKWv6n.mjs';
18
+ import '../shared/bee.DfqnFet4.mjs';
19
+ import '../shared/bee.BImw1HZl.mjs';
19
20
  import 'open';
20
21
  import 'node:module';
21
22
  import 'commander';
@@ -23,7 +24,6 @@ import 'consola/utils';
23
24
  import 'node:fs';
24
25
  import 'node:path';
25
26
  import 'node:os';
26
- import '../shared/bee.BeQSH2t0.mjs';
27
27
 
28
28
  const view = new BeeCommand("view").summary("View a pull request").description(`Use \`--web\` to open in the browser.`).argument("<number>", "Pull request number").addOption(project()).addOption(repo()).addOption(web("pull request")).addOption(noBrowser()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT, ENV_REPO]).examples([
29
29
  { description: "View pull request details", command: "bee pr view 42 -p PROJECT -R repo" },
@@ -4,18 +4,19 @@ import 'node:stream/consumers';
4
4
  import 'valibot';
5
5
  import '../shared/bee.BYqxm3yG.mjs';
6
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
8
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
7
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
8
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
9
9
  import 'backlog-js';
10
10
  import 'node:http';
11
11
  import { r as repositoryUrl, o as openOrPrintUrl } from '../shared/bee.CzKcWSES.mjs';
12
12
  import 'node:child_process';
13
- import '../shared/bee.BtxMsVL4.mjs';
14
- import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.bmiIlr9W.mjs';
15
- import { p as project, w as web, n as noBrowser, j as json, s as space, r as resolveOptions } from '../shared/bee.Bt1TK6yh.mjs';
16
- import '../shared/bee.Ds2l-nTJ.mjs';
13
+ import '../shared/bee.x-FvgDW2.mjs';
14
+ import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
15
+ import { d as project, w as web, n as noBrowser, j as json, s as space, r as resolveOptions } from '../shared/bee.B3N0WBdU.mjs';
16
+ import '../shared/bee.DFnSWb6q.mjs';
17
17
  import '../shared/bee.CktwmH8R.mjs';
18
- import '../shared/bee.DxRKWv6n.mjs';
18
+ import '../shared/bee.DfqnFet4.mjs';
19
+ import '../shared/bee.BImw1HZl.mjs';
19
20
  import 'open';
20
21
  import 'node:module';
21
22
  import 'commander';
@@ -23,7 +24,6 @@ import 'consola/utils';
23
24
  import 'node:fs';
24
25
  import 'node:path';
25
26
  import 'node:os';
26
- import '../shared/bee.BeQSH2t0.mjs';
27
27
 
28
28
  const view = new BeeCommand("view").summary("View a repository").description(`Use \`--web\` to open in the browser.`).argument("<repository>", "Repository name or ID").addOption(project()).addOption(web("repository")).addOption(noBrowser()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
29
29
  {
@@ -3,25 +3,25 @@ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
3
3
  import 'node:stream/consumers';
4
4
  import 'valibot';
5
5
  import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
6
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
7
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
6
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
7
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
8
8
  import 'backlog-js';
9
9
  import 'node:http';
10
10
  import 'open';
11
11
  import 'node:child_process';
12
- import '../shared/bee.BtxMsVL4.mjs';
13
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.bmiIlr9W.mjs';
14
- import { j as json, s as space } from '../shared/bee.Bt1TK6yh.mjs';
15
- import '../shared/bee.Ds2l-nTJ.mjs';
12
+ import '../shared/bee.x-FvgDW2.mjs';
13
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
14
+ import { j as json, s as space } from '../shared/bee.B3N0WBdU.mjs';
15
+ import '../shared/bee.DFnSWb6q.mjs';
16
16
  import '../shared/bee.CktwmH8R.mjs';
17
- import '../shared/bee.DxRKWv6n.mjs';
17
+ import '../shared/bee.DfqnFet4.mjs';
18
+ import '../shared/bee.BImw1HZl.mjs';
18
19
  import 'node:module';
19
20
  import 'commander';
20
21
  import 'consola/utils';
21
22
  import 'node:fs';
22
23
  import 'node:path';
23
24
  import 'node:os';
24
- import '../shared/bee.BeQSH2t0.mjs';
25
25
 
26
26
  const view = new BeeCommand("view").summary("View a team").description(`Shows team details and the list of members.`).argument("<team>", "Team ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
27
27
  { description: "View team details", command: "bee team view 12345" },
@@ -4,26 +4,26 @@ import 'node:stream/consumers';
4
4
  import 'valibot';
5
5
  import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
6
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
7
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
8
8
  import { R as ROLE_LABELS } from '../shared/bee.BXiuAfjJ.mjs';
9
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
9
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
10
10
  import 'backlog-js';
11
11
  import 'node:http';
12
12
  import 'open';
13
13
  import 'node:child_process';
14
- import '../shared/bee.BtxMsVL4.mjs';
15
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.bmiIlr9W.mjs';
16
- import { j as json, s as space } from '../shared/bee.Bt1TK6yh.mjs';
17
- import '../shared/bee.Ds2l-nTJ.mjs';
14
+ import '../shared/bee.x-FvgDW2.mjs';
15
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
16
+ import { j as json, s as space } from '../shared/bee.B3N0WBdU.mjs';
17
+ import '../shared/bee.DFnSWb6q.mjs';
18
18
  import '../shared/bee.CktwmH8R.mjs';
19
- import '../shared/bee.DxRKWv6n.mjs';
19
+ import '../shared/bee.DfqnFet4.mjs';
20
+ import '../shared/bee.BImw1HZl.mjs';
20
21
  import 'node:module';
21
22
  import 'commander';
22
23
  import 'consola/utils';
23
24
  import 'node:fs';
24
25
  import 'node:path';
25
26
  import 'node:os';
26
- import '../shared/bee.BeQSH2t0.mjs';
27
27
 
28
28
  const view = new BeeCommand("view").summary("View a user").description(`Use \`bee user me\` as a shortcut to view your own profile.`).argument("<user>", "User ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
29
29
  { description: "View user details", command: "bee user view 12345" },
@@ -4,18 +4,19 @@ import 'node:stream/consumers';
4
4
  import 'valibot';
5
5
  import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
6
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
8
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
7
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
8
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
9
9
  import 'backlog-js';
10
10
  import 'node:http';
11
11
  import { w as wikiUrl, o as openOrPrintUrl } from '../shared/bee.CzKcWSES.mjs';
12
12
  import 'node:child_process';
13
- import '../shared/bee.BtxMsVL4.mjs';
14
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.bmiIlr9W.mjs';
15
- import { w as web, n as noBrowser, j as json, s as space } from '../shared/bee.Bt1TK6yh.mjs';
16
- import '../shared/bee.Ds2l-nTJ.mjs';
13
+ import '../shared/bee.x-FvgDW2.mjs';
14
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
15
+ import { w as web, n as noBrowser, j as json, s as space } from '../shared/bee.B3N0WBdU.mjs';
16
+ import '../shared/bee.DFnSWb6q.mjs';
17
17
  import '../shared/bee.CktwmH8R.mjs';
18
- import '../shared/bee.DxRKWv6n.mjs';
18
+ import '../shared/bee.DfqnFet4.mjs';
19
+ import '../shared/bee.BImw1HZl.mjs';
19
20
  import 'open';
20
21
  import 'node:module';
21
22
  import 'commander';
@@ -23,7 +24,6 @@ import 'consola/utils';
23
24
  import 'node:fs';
24
25
  import 'node:path';
25
26
  import 'node:os';
26
- import '../shared/bee.BeQSH2t0.mjs';
27
27
 
28
28
  const view = new BeeCommand("view").summary("View a wiki page").description(`Use \`--web\` to open in the browser.`).argument("<wiki>", "Wiki page ID").addOption(web("wiki page")).addOption(noBrowser()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
29
29
  { description: "View a wiki page", command: "bee wiki view 12345" },
@@ -4,25 +4,25 @@ import 'node:stream/consumers';
4
4
  import 'valibot';
5
5
  import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
6
6
  import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
7
- import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
8
- import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
7
+ import { p as printDefinitionList } from '../shared/bee.C4p7W8_P.mjs';
8
+ import { g as getClient } from '../shared/bee.DessOtkV.mjs';
9
9
  import 'backlog-js';
10
10
  import 'node:http';
11
11
  import 'open';
12
12
  import 'node:child_process';
13
- import '../shared/bee.BtxMsVL4.mjs';
14
- import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.bmiIlr9W.mjs';
15
- import { j as json, s as space } from '../shared/bee.Bt1TK6yh.mjs';
16
- import '../shared/bee.Ds2l-nTJ.mjs';
13
+ import '../shared/bee.x-FvgDW2.mjs';
14
+ import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
15
+ import { j as json, s as space } from '../shared/bee.B3N0WBdU.mjs';
16
+ import '../shared/bee.DFnSWb6q.mjs';
17
17
  import '../shared/bee.CktwmH8R.mjs';
18
- import '../shared/bee.DxRKWv6n.mjs';
18
+ import '../shared/bee.DfqnFet4.mjs';
19
+ import '../shared/bee.BImw1HZl.mjs';
19
20
  import 'node:module';
20
21
  import 'commander';
21
22
  import 'consola/utils';
22
23
  import 'node:fs';
23
24
  import 'node:path';
24
25
  import 'node:os';
25
- import '../shared/bee.BeQSH2t0.mjs';
26
26
 
27
27
  const view = new BeeCommand("view").summary("View a watching item").description(`Shows the associated issue, note, read status, and timestamps.`).argument("<watching>", "Watching ID").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
28
28
  { description: "View a watching item", command: "bee watching view 12345" },
package/dist/index.mjs CHANGED
@@ -6,12 +6,12 @@ import 'backlog-js';
6
6
  import 'node:fs';
7
7
  import 'node:path';
8
8
  import 'node:os';
9
- import './shared/bee.BeQSH2t0.mjs';
9
+ import './shared/bee.BImw1HZl.mjs';
10
10
  import 'node:http';
11
11
  import 'open';
12
12
  import 'node:child_process';
13
- import { u as undiciExports } from './shared/bee.BtxMsVL4.mjs';
14
- import { B as BeeCommand } from './shared/bee.bmiIlr9W.mjs';
13
+ import { u as undiciExports } from './shared/bee.x-FvgDW2.mjs';
14
+ import { B as BeeCommand } from './shared/bee.KteAW2rM.mjs';
15
15
  import { CommanderError } from 'commander';
16
16
  import 'node:module';
17
17
  import 'consola/utils';
@@ -148,8 +148,9 @@ const createLoggingInterceptor = () => {
148
148
  });
149
149
  };
150
150
  };
151
- const installHttpLogger = () => {
152
- const agent = new undiciExports.Agent().compose(createLoggingInterceptor());
151
+
152
+ const installHttpDispatcher = () => {
153
+ const agent = new undiciExports.EnvHttpProxyAgent().compose(createLoggingInterceptor());
153
154
  undiciExports.setGlobalDispatcher(agent);
154
155
  };
155
156
 
@@ -170,14 +171,14 @@ const handleError = (error) => {
170
171
  process.exit(1);
171
172
  };
172
173
 
173
- const version = "1.0.0";
174
+ const version = "1.1.0";
174
175
  const description = "Bring Backlog to your command line";
175
176
  const pkg = {
176
177
  version: version,
177
178
  description: description};
178
179
 
179
180
  consola.options.formatOptions.date = false;
180
- installHttpLogger();
181
+ installHttpDispatcher();
181
182
  const program = new BeeCommand("bee").version(pkg.version).description(pkg.description);
182
183
  await program.addCommands([
183
184
  import('./chunks/index.mjs'),
@@ -5,7 +5,7 @@ import consola from 'consola';
5
5
  import { U as UserError, p as parseArg, v as vInteger } from './bee.BYqxm3yG.mjs';
6
6
  import 'node:stream/consumers';
7
7
  import * as v from 'valibot';
8
- import { R as RcSchema } from './bee.BeQSH2t0.mjs';
8
+ import { a as RcSchema } from './bee.BImw1HZl.mjs';
9
9
  import { Option } from 'commander';
10
10
 
11
11
  const promptRequired = async (label, existing, options) => {
@@ -197,6 +197,9 @@ function destr(value, options = {}) {
197
197
  //#region src/index.ts
198
198
  const RE_KEY_VAL = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/;
199
199
  const RE_LINES = /\n|\r|\r\n/;
200
+ /**
201
+ * The default options for the configuration file.
202
+ */
200
203
  const defaults = {
201
204
  name: ".conf",
202
205
  dir: process.cwd(),
@@ -227,26 +230,59 @@ function parse(contents, options = {}) {
227
230
  }
228
231
  return options.flat ? config : unflatten(config, { overwrite: true });
229
232
  }
233
+ /**
234
+ * Parses a configuration string into an object.
235
+ * @param {string} contents - The configuration data as a raw string.
236
+ * @param {RCOptions} [options={}] - Options to control the parsing behaviour. See {@link RCOptions}.
237
+ * @returns {RC} - The parsed configuration object. See {@link RC}.
238
+ */
230
239
  function parseFile(path, options) {
231
240
  if (!existsSync(path)) return {};
232
241
  return parse(readFileSync(path, "utf8"), options);
233
242
  }
243
+ /**
244
+ * Reads a configuration file from a default or specified location and parses its contents.
245
+ * @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.
246
+ * @returns {RC} - The parsed configuration object. See {@link RC}.
247
+ */
234
248
  function read(options) {
235
249
  options = withDefaults(options);
236
250
  return parseFile(resolve(options.dir, options.name), options);
237
251
  }
252
+ /**
253
+ * Reads a custom configuration file from a default or specified location and parses its contents.
254
+ * @param {RCOptions|string} [options] - Options for reading the configuration file, or the name of the configuration file. See {@link RCOptions}.
255
+ * @returns {RC} - The parsed configuration object.
256
+ * @deprecated Use {@link readUserConfig} instead, which uses `~/.config` following XDG conventions.
257
+ */
238
258
  function readUser(options) {
239
259
  options = withDefaults(options);
240
260
  options.dir = process.env.XDG_CONFIG_HOME || homedir();
241
261
  return read(options);
242
262
  }
263
+ /**
264
+ * Serialises a configuration object to a string format.
265
+ * @param {RC} config - The configuration object to serialise. See {@link RC}.
266
+ * @returns {string} - The serialised configuration string.
267
+ */
243
268
  function serialize(config) {
244
269
  return Object.entries(flatten(config)).map(([key, value]) => `${key}=${JSON.stringify(value)}`).join("\n");
245
270
  }
271
+ /**
272
+ * Writes a configuration object to a file in a default or specified location.
273
+ * @param {RC} config - The configuration object to write. See {@link RC}.
274
+ * @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.
275
+ */
246
276
  function write(config, options) {
247
277
  options = withDefaults(options);
248
278
  writeFileSync(resolve(options.dir, options.name), serialize(config), { encoding: "utf8" });
249
279
  }
280
+ /**
281
+ * Writes a custom configuration object to a file in a default or specified location.
282
+ * @param {RC} config - The configuration object to write. See {@link RC}.
283
+ * @param {RCOptions|string} [options] - Options for writing the configuration file, or the name of the configuration file. See {@link RCOptions}.
284
+ * @deprecated Use {@link writeUserConfig} instead, which uses `~/.config` following XDG conventions.
285
+ */
250
286
  function writeUser(config, options) {
251
287
  options = withDefaults(options);
252
288
  options.dir = process.env.XDG_CONFIG_HOME || homedir();
@@ -254,8 +290,7 @@ function writeUser(config, options) {
254
290
  }
255
291
 
256
292
  const CONFIG_FILE_NAME = ".beerc";
257
- const loadConfig = () => {
258
- const raw = readUser(CONFIG_FILE_NAME);
293
+ const parseConfig = (raw) => {
259
294
  const result = v.safeParse(RcSchema, raw);
260
295
  if (!result.success) {
261
296
  const details = result.issues.map((issue) => issue.message).join("\n");
@@ -264,9 +299,10 @@ ${details}`);
264
299
  }
265
300
  return result.output;
266
301
  };
302
+ const loadConfig = () => parseConfig(readUser(CONFIG_FILE_NAME));
267
303
  const configFilePath = () => resolve(process.env.XDG_CONFIG_HOME || homedir(), CONFIG_FILE_NAME);
268
304
  const writeConfig = (config) => {
269
- writeUser(config, CONFIG_FILE_NAME);
305
+ writeUser(parseConfig(config), CONFIG_FILE_NAME);
270
306
  chmodSync(configFilePath(), 384);
271
307
  };
272
308
  const updateConfig = (updater) => {
@@ -299,6 +335,7 @@ const collectNum = (val, prev) => [
299
335
  parseArg(vInteger, val, "value")
300
336
  ];
301
337
  const project = () => new RequiredOption("-p, --project <id>", "Project ID or project key").env("BACKLOG_PROJECT");
338
+ const projectOptional = (description = "Project ID or project key") => new Option("-p, --project <id>", description).env("BACKLOG_PROJECT");
302
339
  const repo = () => new RequiredOption("-R, --repo <name>", "Repository name or ID").env("BACKLOG_REPO");
303
340
  const count = () => new Option("-L, --count <n>", "Number of results (default: 20)");
304
341
  const offset = () => new Option("--offset <n>", "Offset for pagination");
@@ -317,10 +354,13 @@ const milestone = () => new Option("--milestone <id>", "Milestone IDs (repeatabl
317
354
  const comment = () => new Option("-c, --comment <text>", "Comment to add with the update");
318
355
  const web = (resource) => new Option("-w, --web", `Open the ${resource} in the browser`);
319
356
  const noBrowser = () => new Option("-n, --no-browser", "Print the URL instead of opening the browser");
320
- const space = () => new Option("-s, --space <hostname>", "Space hostname").env("BACKLOG_SPACE");
357
+ const space = () => new Option(
358
+ "-s, --space <hostname>",
359
+ "Space hostname (e.g. xxx.backlog.com, or your own domain)"
360
+ ).env("BACKLOG_SPACE");
321
361
  const json = () => new Option(
322
362
  "--json [fields]",
323
363
  "Output as JSON (optionally filter by field names, comma-separated)"
324
364
  ).preset("");
325
365
 
326
- export { maxId as A, repo as B, issue as C, RequiredOption as R, promptRequired as a, writeConfig as b, collect as c, confirmOrExit as d, collectNum as e, count as f, assigneeList as g, offset as h, assignee as i, json as j, keyword as k, loadConfig as l, category as m, noBrowser as n, order as o, project as p, milestone as q, resolveOptions as r, space as s, notify as t, updateConfig as u, version as v, web as w, attachment as x, comment as y, minId as z };
366
+ export { minId as A, maxId as B, repo as C, issue as D, RequiredOption as R, promptRequired as a, writeConfig as b, collect as c, project as d, confirmOrExit as e, collectNum as f, count as g, assigneeList as h, offset as i, json as j, keyword as k, loadConfig as l, assignee as m, noBrowser as n, order as o, projectOptional as p, category as q, resolveOptions as r, space as s, milestone as t, updateConfig as u, version as v, web as w, notify as x, attachment as y, comment as z };
@@ -12,14 +12,17 @@ const OAuthAuthSchema = v.object({
12
12
  clientSecret: v.optional(v.string())
13
13
  });
14
14
  const RcAuthSchema = v.variant("method", [ApiKeyAuthSchema, OAuthAuthSchema]);
15
+ const RcHostSchema = v.pipe(v.string(), v.toLowerCase(), v.domain());
15
16
  const RcSpaceSchema = v.object({
16
- host: v.pipe(v.string(), v.regex(/^[a-z0-9-]+\.backlog\.(com|jp)$/)),
17
+ host: RcHostSchema,
17
18
  auth: RcAuthSchema
18
19
  });
19
20
  const RcSchema = v.object({
20
- defaultSpace: v.optional(v.string()),
21
+ // Lowercased to match the normalized `host` values it is compared against.
22
+ // Not a full host: it may also be a shorthand that `findSpace` expands.
23
+ defaultSpace: v.optional(v.pipe(v.string(), v.toLowerCase())),
21
24
  spaces: v.optional(v.array(RcSpaceSchema), []),
22
25
  aliases: v.optional(v.record(v.string(), v.string()), {})
23
26
  });
24
27
 
25
- export { RcSchema as R };
28
+ export { RcHostSchema as R, RcSchema as a };
@@ -1,5 +1,5 @@
1
1
  import consola from 'consola';
2
- import { s as stringWidth, w as widthPadEnd } from './bee.Ds2l-nTJ.mjs';
2
+ import { s as stringWidth, w as widthPadEnd } from './bee.DFnSWb6q.mjs';
3
3
 
4
4
  const printDefinitionList = (items, indent = 4) => {
5
5
  const filtered = items.filter(
@@ -30,4 +30,22 @@ const ACTIVITY_LABELS = {
30
30
  47: "Issue Multi-Created"
31
31
  };
32
32
 
33
- export { ACTIVITY_LABELS as A };
33
+ const STATUS_DELETED_TYPE = 34;
34
+ const getActivitySummary = (activity) => {
35
+ const { content } = activity;
36
+ if (activity.type === STATUS_DELETED_TYPE && "deletedStatus" in content && content.deletedStatus.name) {
37
+ return content.deletedStatus.name;
38
+ }
39
+ if ("summary" in content && content.summary) {
40
+ return content.summary;
41
+ }
42
+ if ("link" in content && content.link.length > 0) {
43
+ return content.link.map((item) => item.key_id ? `#${item.key_id}` : item.title ?? "").filter(Boolean).join(", ");
44
+ }
45
+ if ("key_id" in content && content.key_id) {
46
+ return `#${content.key_id}`;
47
+ }
48
+ return "";
49
+ };
50
+
51
+ export { ACTIVITY_LABELS as A, getActivitySummary as g };
@@ -168,19 +168,22 @@ function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {
168
168
  Logic:
169
169
  - Segment graphemes to match how terminals render clusters.
170
170
  - Width rules:
171
- 1. Skip non-printing clusters (Default_Ignorable, Control, pure Mark, lone Surrogates). Tabs are ignored by design.
171
+ 1. Skip non-printing clusters (Default_Ignorable, Control, pure nonspacing/enclosing Mark, lone Surrogates). Tabs are ignored by design.
172
172
  2. RGI emoji clusters (\p{RGI_Emoji}) are double-width.
173
173
  3. Minimally-qualified/unqualified emoji clusters (ZWJ sequences with 2+ Extended_Pictographic, or keycap sequences) are double-width.
174
- 4. Otherwise use East Asian Width of the cluster's first visible code point, and add widths for trailing Halfwidth/Fullwidth Forms within the same cluster (e.g., dakuten/handakuten/prolonged sound mark).
174
+ 4. Hangul jamo collapse each standard modern Hangul L+V or L+V+T syllable piece to width 2.
175
+ Unmatched repeated leading/vowel/trailing jamo stay additive because that matches how the terminals we target render them.
176
+ 5. Otherwise use East Asian Width of the cluster's first visible code point, and add widths for trailing spacing marks and Halfwidth/Fullwidth Forms within the same cluster (e.g., dakuten/handakuten/prolonged sound mark).
175
177
  */
176
178
 
177
179
  const segmenter = new Intl.Segmenter();
178
180
 
179
181
  // Whole-cluster zero-width
180
- const zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v;
182
+ const zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Nonspacing_Mark}|\p{Enclosing_Mark}|\p{Surrogate})+$/v;
181
183
 
182
184
  // Pick the base scalar if the cluster starts with Prepend/Format/Marks
183
- const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
185
+ const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Nonspacing_Mark}\p{Enclosing_Mark}\p{Surrogate}]+/v;
186
+ const spacingMarkRegex = /\p{Spacing_Mark}/v;
184
187
 
185
188
  // RGI emoji sequences
186
189
  const rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
@@ -216,13 +219,91 @@ function isZeroWidthCluster(segment) {
216
219
  return zeroWidthClusterRegex.test(segment);
217
220
  }
218
221
 
219
- function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
220
- let extra = 0;
221
- if (segment.length > 1) {
222
- for (const char of segment.slice(1)) {
223
- if (char >= '\uFF00' && char <= '\uFFEF') {
224
- extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
222
+ function isHangulLeadingJamo(codePoint) {
223
+ return (codePoint >= 0x11_00 && codePoint <= 0x11_5F)
224
+ || (codePoint >= 0xA9_60 && codePoint <= 0xA9_7C);
225
+ }
226
+
227
+ function isHangulVowelJamo(codePoint) {
228
+ return (codePoint >= 0x11_60 && codePoint <= 0x11_A7)
229
+ || (codePoint >= 0xD7_B0 && codePoint <= 0xD7_C6);
230
+ }
231
+
232
+ function isHangulTrailingJamo(codePoint) {
233
+ return (codePoint >= 0x11_A8 && codePoint <= 0x11_FF)
234
+ || (codePoint >= 0xD7_CB && codePoint <= 0xD7_FB);
235
+ }
236
+
237
+ function isHangulJamo(codePoint) {
238
+ return isHangulLeadingJamo(codePoint)
239
+ || isHangulVowelJamo(codePoint)
240
+ || isHangulTrailingJamo(codePoint);
241
+ }
242
+
243
+ function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
244
+ const codePoints = [];
245
+
246
+ for (const character of visibleSegment) {
247
+ if (zeroWidthClusterRegex.test(character)) {
248
+ continue;
249
+ }
250
+
251
+ codePoints.push(character.codePointAt(0));
252
+ }
253
+
254
+ if (codePoints.length === 0) {
255
+ return undefined;
256
+ }
257
+
258
+ let width = 0;
259
+
260
+ for (let index = 0; index < codePoints.length; index++) {
261
+ const codePoint = codePoints[index];
262
+ if (!isHangulJamo(codePoint)) {
263
+ if (width === 0) {
264
+ return undefined;
265
+ }
266
+
267
+ // Mixed cluster (e.g., L + precomposed syllable): use EAW for non-jamo remainder
268
+ for (let remaining = index; remaining < codePoints.length; remaining++) {
269
+ width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
225
270
  }
271
+
272
+ return width;
273
+ }
274
+
275
+ // Modern Hangul L+V(+T) shapes as one syllable block. Unmatched jamo stay additive:
276
+ // U+1100 U+1100 U+1161 => U+1100 + (U+1100 U+1161) => 2 + 2.
277
+ if (
278
+ isHangulLeadingJamo(codePoint)
279
+ && isHangulVowelJamo(codePoints[index + 1])
280
+ ) {
281
+ width += 2;
282
+ index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
283
+ continue;
284
+ }
285
+
286
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
287
+ }
288
+
289
+ return width;
290
+ }
291
+
292
+ function trailingWidth(visibleSegment, eastAsianWidthOptions) {
293
+ let extra = 0;
294
+ let first = true;
295
+
296
+ for (const character of visibleSegment) {
297
+ if (first) {
298
+ first = false;
299
+ continue;
300
+ }
301
+
302
+ if (
303
+ spacingMarkRegex.test(character)
304
+ || (character >= '\uFF00' && character <= '\uFFEF')
305
+ ) {
306
+ extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
226
307
  }
227
308
  }
228
309
 
@@ -270,12 +351,19 @@ function stringWidth(input, options = {}) {
270
351
  continue;
271
352
  }
272
353
 
354
+ const visibleSegment = baseVisible(segment);
355
+ const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
356
+ if (hangulWidth !== undefined) {
357
+ width += hangulWidth;
358
+ continue;
359
+ }
360
+
273
361
  // Everything else: EAW of the cluster’s first visible scalar
274
- const codePoint = baseVisible(segment).codePointAt(0);
362
+ const codePoint = visibleSegment.codePointAt(0);
275
363
  width += eastAsianWidth(codePoint, eastAsianWidthOptions);
276
364
 
277
- // Add width for trailing Halfwidth and Fullwidth Forms (e.g., ゙, ゚, ー)
278
- width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
365
+ // Add width for trailing spacing marks and Halfwidth/Fullwidth Forms (e.g., ゙, ゚, ー)
366
+ width += trailingWidth(visibleSegment, eastAsianWidthOptions);
279
367
  }
280
368
 
281
369
  return width;