@nulab/bee 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activities-BPTHt_MD.mjs +69 -0
- package/dist/activities-CRiEq51-.mjs +72 -0
- package/dist/activities-DyOMqdsM.mjs +69 -0
- package/dist/activity-labels-CLFpxp8o.mjs +34 -0
- package/dist/add-Br-_TLRp.mjs +55 -0
- package/dist/add-CTmmy2t9.mjs +26 -0
- package/dist/add-user-BVWFcbH7.mjs +26 -0
- package/dist/api-DhA8avDD.mjs +134 -0
- package/dist/attachments-CnL8t9tK.mjs +50 -0
- package/dist/attachments-D8IoJjYE.mjs +50 -0
- package/dist/attachments-DfgEkAY2.mjs +46 -0
- package/dist/auth-5TJGBPxi.mjs +13 -0
- package/dist/bee-command-v0qvZeth.mjs +57 -0
- package/dist/browse-vgF6nz7X.mjs +304 -0
- package/dist/category-BZ7XdVgx.mjs +11 -0
- package/dist/clone-DAWVtVbZ.mjs +43 -0
- package/dist/close-cTyZPv77.mjs +37 -0
- package/dist/comment-CkYJYFrF.mjs +115 -0
- package/dist/comment-DzRBQNv8.mjs +102 -0
- package/dist/comments-SnOZ-EUJ.mjs +47 -0
- package/dist/common-options-BuYWxYdO.mjs +45 -0
- package/dist/completion-yX2VOQSl.mjs +113 -0
- package/dist/count-BI7ld4k5.mjs +50 -0
- package/dist/count-Bw0mVlxC.mjs +40 -0
- package/dist/count-CH_LN4k6.mjs +51 -0
- package/dist/count-CHzDiMV3.mjs +25 -0
- package/dist/count-DvmYzPD_.mjs +46 -0
- package/dist/create-BHjwacOk.mjs +47 -0
- package/dist/create-BXWATibN.mjs +41 -0
- package/dist/create-BtLVFmbR.mjs +29 -0
- package/dist/create-CoF2bahH.mjs +29 -0
- package/dist/create-DhAOhro9.mjs +60 -0
- package/dist/create-DtMLv7Wq.mjs +26 -0
- package/dist/create-PtahSFdG.mjs +66 -0
- package/dist/create-Y4vo2zwX.mjs +44 -0
- package/dist/create-vwRKZ3Lm.mjs +31 -0
- package/dist/dashboard-CYYU5Yii.mjs +97 -0
- package/dist/delete-BCAPHs-g.mjs +25 -0
- package/dist/delete-BHNt5SWa.mjs +24 -0
- package/dist/delete-BlmanW0H.mjs +25 -0
- package/dist/delete-Bxk14ntp.mjs +24 -0
- package/dist/delete-C05oMZEW.mjs +24 -0
- package/dist/delete-CMwkcSiA.mjs +25 -0
- package/dist/delete-CTeH7nzL.mjs +29 -0
- package/dist/delete-D2yDBhZc.mjs +24 -0
- package/dist/delete-HMOfvtv3.mjs +25 -0
- package/dist/document-vTiqLew9.mjs +14 -0
- package/dist/edit-BBvSbt0m.mjs +22 -0
- package/dist/edit-BfCZ2Abi.mjs +50 -0
- package/dist/edit-CN1gdpjd.mjs +37 -0
- package/dist/edit-C_KbKopB.mjs +36 -0
- package/dist/edit-D5Z45NVj.mjs +27 -0
- package/dist/edit-DKQw-XXP.mjs +27 -0
- package/dist/edit-DRxr4r-r.mjs +60 -0
- package/dist/edit-DxsP-aPX.mjs +43 -0
- package/dist/edit-Otc7XHU7.mjs +52 -0
- package/dist/file-DwPTUKOI.mjs +17 -0
- package/dist/format-DHAR0n3J.mjs +9 -0
- package/dist/history-DpjqxFkX.mjs +55 -0
- package/dist/index.mjs +33 -37918
- package/dist/issue-BRzJy3k1.mjs +18 -0
- package/dist/issue-type-Byzh4yLx.mjs +11 -0
- package/dist/list-B3A5SDEm.mjs +35 -0
- package/dist/list-BMKaJoe_.mjs +64 -0
- package/dist/list-BOMbpS4m.mjs +46 -0
- package/dist/list-BmZ_JbLB.mjs +104 -0
- package/dist/list-BpUUxxwQ.mjs +46 -0
- package/dist/list-CgIebllW.mjs +94 -0
- package/dist/list-D0Z__0nw.mjs +42 -0
- package/dist/list-D3FkO9gb.mjs +56 -0
- package/dist/list-D7WLdHvX.mjs +42 -0
- package/dist/list-DAr3urtu.mjs +53 -0
- package/dist/list-DqpWd9aR.mjs +59 -0
- package/dist/list-VO_PbRjC.mjs +50 -0
- package/dist/list-b6ByzUFt.mjs +79 -0
- package/dist/list-jpQ28gU2.mjs +56 -0
- package/dist/list-y93EXyDj.mjs +42 -0
- package/dist/login-BnJYzdR3.mjs +228 -0
- package/dist/logout-YMnSRLLF.mjs +56 -0
- package/dist/me-CLPAe7X2.mjs +36 -0
- package/dist/milestone-Dc3alfp9.mjs +11 -0
- package/dist/notification-CsOuC8Uk.mjs +11 -0
- package/dist/output-DBvfyU1J.mjs +39 -0
- package/dist/pr-BBe07JUp.mjs +15 -0
- package/dist/project-Dilo1T5e.mjs +16 -0
- package/dist/read-BS2G4sNq.mjs +17 -0
- package/dist/read-CyCASx6U.mjs +17 -0
- package/dist/read-all-CjgMJ2to.mjs +16 -0
- package/dist/refresh-DDU2ZLnc.mjs +54 -0
- package/dist/registry-D8DfbunX.mjs +2 -0
- package/dist/registry-PlBmfTR4.mjs +35 -0
- package/dist/remove-BSDJvkVJ.mjs +17 -0
- package/dist/remove-user-CShNCvf8.mjs +26 -0
- package/dist/reopen-BIRhcmsI.mjs +28 -0
- package/dist/repo-B2K8y0mD.mjs +10 -0
- package/dist/role-labels-CLA2wmjO.mjs +11 -0
- package/dist/space-BgZeUqoH.mjs +6 -0
- package/dist/{shared/bee.CHtg3F43.mjs → src-BWaxjrq_.mjs} +143 -175
- package/dist/src-CP4YLIAh.mjs +1008 -0
- package/dist/src-CTD9-bSB.mjs +22760 -0
- package/dist/star-Sgb-e2CQ.mjs +11 -0
- package/dist/status-BkFMW8Jh.mjs +53 -0
- package/dist/status-CaGqMXh7.mjs +64 -0
- package/dist/status-DDFyQrRZ.mjs +11 -0
- package/dist/status-nI4Dpcoo.mjs +58 -0
- package/dist/stdin-C-vjNi9T.mjs +17 -0
- package/dist/switch-CMLfVGDN.mjs +34 -0
- package/dist/tags-DuMJZyBL.mjs +29 -0
- package/dist/team-DfQn8Tf5.mjs +6 -0
- package/dist/token-BmkUX9vc.mjs +28 -0
- package/dist/tree-CozBqPbN.mjs +46 -0
- package/dist/user-DMyFmoP3.mjs +11 -0
- package/dist/users-BSGqsGSy.mjs +51 -0
- package/dist/view-Bj99sk7O.mjs +48 -0
- package/dist/view-Bs8o0c7i.mjs +36 -0
- package/dist/view-C1ECwTMN.mjs +54 -0
- package/dist/view-COBYBfu7.mjs +38 -0
- package/dist/view-CZHT-HiE.mjs +36 -0
- package/dist/view-D1RuQJV6.mjs +76 -0
- package/dist/view-DBO75WzR.mjs +54 -0
- package/dist/view-DJHrnN8j.mjs +62 -0
- package/dist/view-DLx6qQt9.mjs +51 -0
- package/dist/watching-D22YYxOT.mjs +12 -0
- package/dist/wiki-B-DQUuIX.mjs +16 -0
- package/package.json +14 -11
- package/dist/chunks/activities.mjs +0 -75
- package/dist/chunks/activities2.mjs +0 -75
- package/dist/chunks/activities3.mjs +0 -75
- package/dist/chunks/add-user.mjs +0 -38
- package/dist/chunks/add.mjs +0 -63
- package/dist/chunks/add2.mjs +0 -39
- package/dist/chunks/api.mjs +0 -174
- package/dist/chunks/attachments.mjs +0 -47
- package/dist/chunks/attachments2.mjs +0 -47
- package/dist/chunks/attachments3.mjs +0 -48
- package/dist/chunks/browse.mjs +0 -269
- package/dist/chunks/clone.mjs +0 -60
- package/dist/chunks/close.mjs +0 -50
- package/dist/chunks/comment.mjs +0 -125
- package/dist/chunks/comment2.mjs +0 -111
- package/dist/chunks/comments.mjs +0 -57
- package/dist/chunks/completion.mjs +0 -113
- package/dist/chunks/count.mjs +0 -68
- package/dist/chunks/count2.mjs +0 -69
- package/dist/chunks/count3.mjs +0 -59
- package/dist/chunks/count4.mjs +0 -35
- package/dist/chunks/count5.mjs +0 -52
- package/dist/chunks/create.mjs +0 -60
- package/dist/chunks/create2.mjs +0 -88
- package/dist/chunks/create3.mjs +0 -64
- package/dist/chunks/create4.mjs +0 -74
- package/dist/chunks/create5.mjs +0 -56
- package/dist/chunks/create6.mjs +0 -37
- package/dist/chunks/create7.mjs +0 -45
- package/dist/chunks/create8.mjs +0 -49
- package/dist/chunks/create9.mjs +0 -49
- package/dist/chunks/dashboard.mjs +0 -84
- package/dist/chunks/delete.mjs +0 -48
- package/dist/chunks/delete2.mjs +0 -46
- package/dist/chunks/delete3.mjs +0 -46
- package/dist/chunks/delete4.mjs +0 -49
- package/dist/chunks/delete5.mjs +0 -50
- package/dist/chunks/delete6.mjs +0 -50
- package/dist/chunks/delete7.mjs +0 -62
- package/dist/chunks/delete8.mjs +0 -53
- package/dist/chunks/delete9.mjs +0 -48
- package/dist/chunks/edit.mjs +0 -56
- package/dist/chunks/edit2.mjs +0 -78
- package/dist/chunks/edit3.mjs +0 -65
- package/dist/chunks/edit4.mjs +0 -51
- package/dist/chunks/edit5.mjs +0 -43
- package/dist/chunks/edit6.mjs +0 -54
- package/dist/chunks/edit7.mjs +0 -50
- package/dist/chunks/edit8.mjs +0 -50
- package/dist/chunks/history.mjs +0 -56
- package/dist/chunks/index.mjs +0 -15
- package/dist/chunks/index10.mjs +0 -18
- package/dist/chunks/index11.mjs +0 -13
- package/dist/chunks/index12.mjs +0 -13
- package/dist/chunks/index13.mjs +0 -13
- package/dist/chunks/index14.mjs +0 -8
- package/dist/chunks/index15.mjs +0 -13
- package/dist/chunks/index16.mjs +0 -13
- package/dist/chunks/index17.mjs +0 -14
- package/dist/chunks/index2.mjs +0 -18
- package/dist/chunks/index3.mjs +0 -20
- package/dist/chunks/index4.mjs +0 -15
- package/dist/chunks/index5.mjs +0 -13
- package/dist/chunks/index6.mjs +0 -17
- package/dist/chunks/index7.mjs +0 -8
- package/dist/chunks/index8.mjs +0 -8
- package/dist/chunks/index9.mjs +0 -13
- package/dist/chunks/list.mjs +0 -52
- package/dist/chunks/list10.mjs +0 -44
- package/dist/chunks/list11.mjs +0 -49
- package/dist/chunks/list12.mjs +0 -45
- package/dist/chunks/list13.mjs +0 -45
- package/dist/chunks/list14.mjs +0 -54
- package/dist/chunks/list15.mjs +0 -46
- package/dist/chunks/list2.mjs +0 -103
- package/dist/chunks/list3.mjs +0 -85
- package/dist/chunks/list4.mjs +0 -79
- package/dist/chunks/list5.mjs +0 -77
- package/dist/chunks/list6.mjs +0 -45
- package/dist/chunks/list7.mjs +0 -48
- package/dist/chunks/list8.mjs +0 -46
- package/dist/chunks/list9.mjs +0 -53
- package/dist/chunks/login.mjs +0 -218
- package/dist/chunks/logout.mjs +0 -76
- package/dist/chunks/me.mjs +0 -48
- package/dist/chunks/read-all.mjs +0 -29
- package/dist/chunks/read.mjs +0 -29
- package/dist/chunks/read2.mjs +0 -27
- package/dist/chunks/refresh.mjs +0 -76
- package/dist/chunks/remove-user.mjs +0 -38
- package/dist/chunks/remove.mjs +0 -27
- package/dist/chunks/reopen.mjs +0 -42
- package/dist/chunks/status.mjs +0 -64
- package/dist/chunks/status2.mjs +0 -61
- package/dist/chunks/status3.mjs +0 -66
- package/dist/chunks/switch.mjs +0 -55
- package/dist/chunks/tags.mjs +0 -41
- package/dist/chunks/token.mjs +0 -42
- package/dist/chunks/tree.mjs +0 -61
- package/dist/chunks/users.mjs +0 -48
- package/dist/chunks/view.mjs +0 -58
- package/dist/chunks/view2.mjs +0 -95
- package/dist/chunks/view3.mjs +0 -68
- package/dist/chunks/view4.mjs +0 -70
- package/dist/chunks/view5.mjs +0 -61
- package/dist/chunks/view6.mjs +0 -52
- package/dist/chunks/view7.mjs +0 -48
- package/dist/chunks/view8.mjs +0 -61
- package/dist/chunks/view9.mjs +0 -48
- package/dist/shared/bee.084B_7FC.mjs +0 -27
- package/dist/shared/bee.BTBGpv4K.mjs +0 -34
- package/dist/shared/bee.BXiuAfjJ.mjs +0 -10
- package/dist/shared/bee.Btmq3TXs.mjs +0 -19
- package/dist/shared/bee.C--ZWPxf.mjs +0 -14
- package/dist/shared/bee.C4p7W8_P.mjs +0 -18
- package/dist/shared/bee.CAARNIp6.mjs +0 -49
- package/dist/shared/bee.CirccSk2.mjs +0 -51
- package/dist/shared/bee.CktwmH8R.mjs +0 -25
- package/dist/shared/bee.CzKcWSES.mjs +0 -42
- package/dist/shared/bee.DFnSWb6q.mjs +0 -396
- package/dist/shared/bee.DoTvz3uW.mjs +0 -13
- package/dist/shared/bee.KteAW2rM.mjs +0 -73
- package/dist/shared/bee.RsR9yniy.mjs +0 -131
- package/dist/shared/bee.a05kNWpn.mjs +0 -32
- package/dist/shared/bee.n5MYN4a6.mjs +0 -12
- package/dist/shared/bee.q93n012-.mjs +0 -14
package/dist/chunks/index6.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { B as BeeCommand } from '../shared/bee.KteAW2rM.mjs';
|
|
2
|
-
import 'commander';
|
|
3
|
-
import 'consola/utils';
|
|
4
|
-
|
|
5
|
-
const pr = new BeeCommand("pr").summary("Manage Backlog pull requests");
|
|
6
|
-
await pr.addCommands([
|
|
7
|
-
import('./list5.mjs'),
|
|
8
|
-
import('./view4.mjs'),
|
|
9
|
-
import('./comments.mjs'),
|
|
10
|
-
import('./status3.mjs'),
|
|
11
|
-
import('./create4.mjs'),
|
|
12
|
-
import('./edit3.mjs'),
|
|
13
|
-
import('./comment2.mjs'),
|
|
14
|
-
import('./count3.mjs')
|
|
15
|
-
]);
|
|
16
|
-
|
|
17
|
-
export { pr as default };
|
package/dist/chunks/index7.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { B as BeeCommand } from '../shared/bee.KteAW2rM.mjs';
|
|
2
|
-
import 'commander';
|
|
3
|
-
import 'consola/utils';
|
|
4
|
-
|
|
5
|
-
const repo = new BeeCommand("repo").summary("Manage Backlog Git repositories");
|
|
6
|
-
await repo.addCommands([import('./list6.mjs'), import('./view5.mjs'), import('./clone.mjs')]);
|
|
7
|
-
|
|
8
|
-
export { repo as default };
|
package/dist/chunks/index8.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { B as BeeCommand } from '../shared/bee.KteAW2rM.mjs';
|
|
2
|
-
import 'commander';
|
|
3
|
-
import 'consola/utils';
|
|
4
|
-
|
|
5
|
-
const team = new BeeCommand("team").summary("Manage Backlog teams");
|
|
6
|
-
await team.addCommands([import('./list7.mjs'), import('./view6.mjs')]);
|
|
7
|
-
|
|
8
|
-
export { team as default };
|
package/dist/chunks/index9.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { B as BeeCommand } from '../shared/bee.KteAW2rM.mjs';
|
|
2
|
-
import 'commander';
|
|
3
|
-
import 'consola/utils';
|
|
4
|
-
|
|
5
|
-
const user = new BeeCommand("user").summary("Manage Backlog users");
|
|
6
|
-
await user.addCommands([
|
|
7
|
-
import('./list8.mjs'),
|
|
8
|
-
import('./view7.mjs'),
|
|
9
|
-
import('./me.mjs'),
|
|
10
|
-
import('./activities2.mjs')
|
|
11
|
-
]);
|
|
12
|
-
|
|
13
|
-
export { user as default };
|
package/dist/chunks/list.mjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import '../index.mjs';
|
|
6
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
8
|
-
import 'backlog-js';
|
|
9
|
-
import 'node:http';
|
|
10
|
-
import 'open';
|
|
11
|
-
import 'node:child_process';
|
|
12
|
-
import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
|
|
13
|
-
import { j as json, s as space } from '../shared/bee.CHtg3F43.mjs';
|
|
14
|
-
import 'node:fs';
|
|
15
|
-
import 'node:path';
|
|
16
|
-
import 'node:os';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'commander';
|
|
19
|
-
import 'consola/utils';
|
|
20
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
21
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
22
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
23
|
-
|
|
24
|
-
const list = new BeeCommand("list").summary("List projects").description(
|
|
25
|
-
`By default, only active (non-archived) projects are shown. Use \`--all\` to list all projects in the space (admin only).`
|
|
26
|
-
).option("--archived", "Include archived projects").option("--all", "Include all projects (admin only)").addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
|
|
27
|
-
{ description: "List your active projects", command: "bee project list" },
|
|
28
|
-
{ description: "Include archived projects", command: "bee project list --archived" },
|
|
29
|
-
{ description: "List all projects (admin only)", command: "bee project list --all" },
|
|
30
|
-
{ description: "Output as JSON", command: "bee project list --json" }
|
|
31
|
-
]).action(async (opts) => {
|
|
32
|
-
const { client } = await getClient(opts.space);
|
|
33
|
-
const projects = await client.getProjects({
|
|
34
|
-
archived: opts.archived,
|
|
35
|
-
all: opts.all
|
|
36
|
-
});
|
|
37
|
-
const jsonArg = opts.json === true ? "" : opts.json;
|
|
38
|
-
outputResult(projects, { ...opts, json: jsonArg }, (data) => {
|
|
39
|
-
if (data.length === 0) {
|
|
40
|
-
consola.info("No projects found.");
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const rows = data.map((project) => [
|
|
44
|
-
{ header: "KEY", value: project.projectKey },
|
|
45
|
-
{ header: "NAME", value: project.name },
|
|
46
|
-
{ header: "STATUS", value: project.archived ? "Archived" : "Active" }
|
|
47
|
-
]);
|
|
48
|
-
printTable(rows);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
export { list as default };
|
package/dist/chunks/list10.mjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import '../index.mjs';
|
|
6
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
8
|
-
import 'backlog-js';
|
|
9
|
-
import 'node:http';
|
|
10
|
-
import 'open';
|
|
11
|
-
import 'node:child_process';
|
|
12
|
-
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
|
|
13
|
-
import { d as project, j as json, s as space, r as resolveOptions } from '../shared/bee.CHtg3F43.mjs';
|
|
14
|
-
import 'node:fs';
|
|
15
|
-
import 'node:path';
|
|
16
|
-
import 'node:os';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'commander';
|
|
19
|
-
import 'consola/utils';
|
|
20
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
21
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
22
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
23
|
-
|
|
24
|
-
const list = new BeeCommand("list").summary("List categories").description(`Categories help organize issues by grouping them into logical areas.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
25
|
-
{ description: "List all categories in a project", command: "bee category list -p PROJECT" },
|
|
26
|
-
{ description: "Output as JSON", command: "bee category list -p PROJECT --json" }
|
|
27
|
-
]).action(async (opts, cmd) => {
|
|
28
|
-
await resolveOptions(cmd);
|
|
29
|
-
const { client } = await getClient(opts.space);
|
|
30
|
-
const categories = await client.getCategories(opts.project);
|
|
31
|
-
outputResult(categories, opts, (data) => {
|
|
32
|
-
if (data.length === 0) {
|
|
33
|
-
consola.info("No categories found.");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const rows = data.map((c) => [
|
|
37
|
-
{ header: "ID", value: String(c.id) },
|
|
38
|
-
{ header: "NAME", value: c.name }
|
|
39
|
-
]);
|
|
40
|
-
printTable(rows);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export { list as default };
|
package/dist/chunks/list11.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import '../index.mjs';
|
|
6
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
8
|
-
import 'backlog-js';
|
|
9
|
-
import 'node:http';
|
|
10
|
-
import 'open';
|
|
11
|
-
import 'node:child_process';
|
|
12
|
-
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
|
|
13
|
-
import { d as project, j as json, s as space, r as resolveOptions } from '../shared/bee.CHtg3F43.mjs';
|
|
14
|
-
import 'node:fs';
|
|
15
|
-
import 'node:path';
|
|
16
|
-
import 'node:os';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'commander';
|
|
19
|
-
import 'consola/utils';
|
|
20
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
21
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
22
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
23
|
-
|
|
24
|
-
const list = new BeeCommand("list").summary("List milestones").description(
|
|
25
|
-
`Milestones (versions) track release schedules and group issues by development cycle.`
|
|
26
|
-
).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
27
|
-
{ description: "List all milestones", command: "bee milestone list -p PROJECT" },
|
|
28
|
-
{ description: "Output as JSON", command: "bee milestone list -p PROJECT --json" }
|
|
29
|
-
]).action(async (opts, cmd) => {
|
|
30
|
-
await resolveOptions(cmd);
|
|
31
|
-
const { client } = await getClient(opts.space);
|
|
32
|
-
const milestones = await client.getVersions(opts.project);
|
|
33
|
-
outputResult(milestones, opts, (data) => {
|
|
34
|
-
if (data.length === 0) {
|
|
35
|
-
consola.info("No milestones found.");
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const rows = data.map((m) => [
|
|
39
|
-
{ header: "ID", value: String(m.id) },
|
|
40
|
-
{ header: "NAME", value: m.name },
|
|
41
|
-
{ header: "START DATE", value: m.startDate?.slice(0, 10) ?? "" },
|
|
42
|
-
{ header: "RELEASE DUE DATE", value: m.releaseDueDate?.slice(0, 10) ?? "" },
|
|
43
|
-
{ header: "ARCHIVED", value: m.archived ? "Yes" : "No" }
|
|
44
|
-
]);
|
|
45
|
-
printTable(rows);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export { list as default };
|
package/dist/chunks/list12.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import '../index.mjs';
|
|
6
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
8
|
-
import 'backlog-js';
|
|
9
|
-
import 'node:http';
|
|
10
|
-
import 'open';
|
|
11
|
-
import 'node:child_process';
|
|
12
|
-
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
|
|
13
|
-
import { d as project, j as json, s as space, r as resolveOptions } from '../shared/bee.CHtg3F43.mjs';
|
|
14
|
-
import 'node:fs';
|
|
15
|
-
import 'node:path';
|
|
16
|
-
import 'node:os';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'commander';
|
|
19
|
-
import 'consola/utils';
|
|
20
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
21
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
22
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
23
|
-
|
|
24
|
-
const list = new BeeCommand("list").summary("List issue types").description(`Issue types categorize issues and are displayed with their associated color.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
25
|
-
{ description: "List all issue types", command: "bee issue-type list -p PROJECT" },
|
|
26
|
-
{ description: "Output as JSON", command: "bee issue-type list -p PROJECT --json" }
|
|
27
|
-
]).action(async (opts, cmd) => {
|
|
28
|
-
await resolveOptions(cmd);
|
|
29
|
-
const { client } = await getClient(opts.space);
|
|
30
|
-
const issueTypes = await client.getIssueTypes(opts.project);
|
|
31
|
-
outputResult(issueTypes, opts, (data) => {
|
|
32
|
-
if (data.length === 0) {
|
|
33
|
-
consola.info("No issue types found.");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const rows = data.map((t) => [
|
|
37
|
-
{ header: "ID", value: String(t.id) },
|
|
38
|
-
{ header: "NAME", value: t.name },
|
|
39
|
-
{ header: "COLOR", value: t.color }
|
|
40
|
-
]);
|
|
41
|
-
printTable(rows);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export { list as default };
|
package/dist/chunks/list13.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import '../index.mjs';
|
|
6
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
8
|
-
import 'backlog-js';
|
|
9
|
-
import 'node:http';
|
|
10
|
-
import 'open';
|
|
11
|
-
import 'node:child_process';
|
|
12
|
-
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
|
|
13
|
-
import { d as project, j as json, s as space, r as resolveOptions } from '../shared/bee.CHtg3F43.mjs';
|
|
14
|
-
import 'node:fs';
|
|
15
|
-
import 'node:path';
|
|
16
|
-
import 'node:os';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'commander';
|
|
19
|
-
import 'consola/utils';
|
|
20
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
21
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
22
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
23
|
-
|
|
24
|
-
const list = new BeeCommand("list").summary("List statuses").description(`Statuses define the workflow states that issues move through.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
25
|
-
{ description: "List all statuses", command: "bee status list -p PROJECT" },
|
|
26
|
-
{ description: "Output as JSON", command: "bee status list -p PROJECT --json" }
|
|
27
|
-
]).action(async (opts, cmd) => {
|
|
28
|
-
await resolveOptions(cmd);
|
|
29
|
-
const { client } = await getClient(opts.space);
|
|
30
|
-
const statuses = await client.getProjectStatuses(opts.project);
|
|
31
|
-
outputResult(statuses, opts, (data) => {
|
|
32
|
-
if (data.length === 0) {
|
|
33
|
-
consola.info("No statuses found.");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const rows = data.map((s) => [
|
|
37
|
-
{ header: "ID", value: String(s.id) },
|
|
38
|
-
{ header: "NAME", value: s.name },
|
|
39
|
-
{ header: "COLOR", value: s.color }
|
|
40
|
-
]);
|
|
41
|
-
printTable(rows);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export { list as default };
|
package/dist/chunks/list14.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import { p as parseArg, v as vInteger } from '../index.mjs';
|
|
6
|
-
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
7
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
9
|
-
import 'backlog-js';
|
|
10
|
-
import 'node:http';
|
|
11
|
-
import 'open';
|
|
12
|
-
import 'node:child_process';
|
|
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.CHtg3F43.mjs';
|
|
15
|
-
import 'node:fs';
|
|
16
|
-
import 'node:path';
|
|
17
|
-
import 'node:os';
|
|
18
|
-
import 'node:module';
|
|
19
|
-
import 'commander';
|
|
20
|
-
import 'consola/utils';
|
|
21
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
22
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
23
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
24
|
-
|
|
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([
|
|
26
|
-
{ description: "List your stars", command: "bee star list" },
|
|
27
|
-
{ description: "List stars for a specific user", command: "bee star list 12345" },
|
|
28
|
-
{ description: "Output as JSON", command: "bee star list --json" }
|
|
29
|
-
]).action(async (user, opts) => {
|
|
30
|
-
const { client } = await getClient(opts.space);
|
|
31
|
-
let userId;
|
|
32
|
-
if (user) {
|
|
33
|
-
userId = parseArg(vInteger, user, "user");
|
|
34
|
-
} else {
|
|
35
|
-
const myself = await client.getMyself();
|
|
36
|
-
userId = myself.id;
|
|
37
|
-
}
|
|
38
|
-
const stars = await client.getUserStars(userId, {});
|
|
39
|
-
outputResult(stars, opts, (data) => {
|
|
40
|
-
if (data.length === 0) {
|
|
41
|
-
consola.info("No stars found.");
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const rows = data.map((s) => [
|
|
45
|
-
{ header: "ID", value: String(s.id) },
|
|
46
|
-
{ header: "TITLE", value: s.title },
|
|
47
|
-
{ header: "PRESENTER", value: s.presenter.name },
|
|
48
|
-
{ header: "DATE", value: formatDate(s.created) }
|
|
49
|
-
]);
|
|
50
|
-
printTable(rows);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export { list as default };
|
package/dist/chunks/list15.mjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
3
|
-
import 'node:stream/consumers';
|
|
4
|
-
import 'valibot';
|
|
5
|
-
import '../index.mjs';
|
|
6
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
8
|
-
import 'backlog-js';
|
|
9
|
-
import 'node:http';
|
|
10
|
-
import 'open';
|
|
11
|
-
import 'node:child_process';
|
|
12
|
-
import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
|
|
13
|
-
import { j as json, s as space } from '../shared/bee.CHtg3F43.mjs';
|
|
14
|
-
import 'node:fs';
|
|
15
|
-
import 'node:path';
|
|
16
|
-
import 'node:os';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'commander';
|
|
19
|
-
import 'consola/utils';
|
|
20
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
21
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
22
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
23
|
-
|
|
24
|
-
const list = new BeeCommand("list").summary("List watching items").description(`Unread items are marked with an asterisk (\`*\`).`).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
|
|
25
|
-
{ description: "List your watching items", command: "bee watching list" },
|
|
26
|
-
{ description: "Output as JSON", command: "bee watching list --json" }
|
|
27
|
-
]).action(async (opts) => {
|
|
28
|
-
const { client } = await getClient(opts.space);
|
|
29
|
-
const myself = await client.getMyself();
|
|
30
|
-
const watchings = await client.getWatchingListItems(myself.id);
|
|
31
|
-
outputResult(watchings, opts, (data) => {
|
|
32
|
-
if (data.length === 0) {
|
|
33
|
-
consola.info("No watching items found.");
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const rows = data.map((w) => [
|
|
37
|
-
{ header: "", value: w.resourceAlreadyRead ? " " : "*" },
|
|
38
|
-
{ header: "ID", value: String(w.id) },
|
|
39
|
-
{ header: "ISSUE KEY", value: w.issue.issueKey },
|
|
40
|
-
{ header: "TITLE", value: w.issue.summary }
|
|
41
|
-
]);
|
|
42
|
-
printTable(rows);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export { list as default };
|
package/dist/chunks/list2.mjs
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { P as PriorityId, a as PRIORITY_NAMES } from '../shared/bee.Btmq3TXs.mjs';
|
|
3
|
-
import { r as resolveProjectIds } from '../shared/bee.084B_7FC.mjs';
|
|
4
|
-
import { r as resolveUserId } from '../shared/bee.q93n012-.mjs';
|
|
5
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
6
|
-
import 'backlog-js';
|
|
7
|
-
import 'node:http';
|
|
8
|
-
import 'open';
|
|
9
|
-
import 'node:child_process';
|
|
10
|
-
import { p as parseArg, v as vInteger } from '../index.mjs';
|
|
11
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
12
|
-
import 'node:stream/consumers';
|
|
13
|
-
import * as v from 'valibot';
|
|
14
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
15
|
-
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
|
|
16
|
-
import { p as projectOptional, h as assigneeList, f as collectNum, c as collect, k as keyword, o as order, g as count, i as offset, j as json, s as space } from '../shared/bee.CHtg3F43.mjs';
|
|
17
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
18
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
19
|
-
import 'node:fs';
|
|
20
|
-
import 'node:path';
|
|
21
|
-
import 'node:os';
|
|
22
|
-
import 'node:module';
|
|
23
|
-
import 'commander';
|
|
24
|
-
import 'consola/utils';
|
|
25
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
26
|
-
|
|
27
|
-
const resolvePriorityIds = (priorities) => priorities.map((name) => {
|
|
28
|
-
const id = PriorityId[name.toLowerCase()];
|
|
29
|
-
if (id === void 0) {
|
|
30
|
-
throw new Error(`Unknown priority "${name}". Valid values: ${PRIORITY_NAMES.join(", ")}`);
|
|
31
|
-
}
|
|
32
|
-
return id;
|
|
33
|
-
});
|
|
34
|
-
const list = new BeeCommand("list").summary("List issues").description(
|
|
35
|
-
`By default, sorted by last updated date in descending order. Multiple project keys can be comma-separated.`
|
|
36
|
-
).addOption(projectOptional("Project ID or project key (comma-separated for multiple)")).addOption(assigneeList()).option("-S, --status <id>", "Status ID (repeatable)", collectNum, []).option("-P, --priority <name>", "Priority name (repeatable)", collect, []).option("-T, --type <id>", "Issue type ID (repeatable)", collectNum, []).option("--category <id>", "Category ID (repeatable)", collectNum, []).option("--version <id>", "Version ID (repeatable)", collectNum, []).option("--milestone <id>", "Milestone ID (repeatable)", collectNum, []).option("--resolution <id>", "Resolution ID (repeatable)", collectNum, []).option("--parent-issue <id>", "Parent issue ID (repeatable)", collectNum, []).addOption(keyword()).option("--created-since <date>", "Show issues created on or after this date").option("--created-until <date>", "Show issues created on or before this date").option("--updated-since <date>", "Show issues updated on or after this date").option("--updated-until <date>", "Show issues updated on or before this date").option("--start-since <date>", "Show issues starting on or after this date").option("--start-until <date>", "Show issues starting on or before this date").option("--due-since <date>", "Show issues due on or after this date").option("--due-until <date>", "Show issues due on or before this date").option("--sort <field>", "Sort field").addOption(order()).addOption(count()).addOption(offset()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
37
|
-
{ description: "List issues in a project", command: "bee issue list -p PROJECT" },
|
|
38
|
-
{ description: "List your assigned issues", command: "bee issue list -p PROJECT -a @me" },
|
|
39
|
-
{
|
|
40
|
-
description: "Filter by keyword and priority",
|
|
41
|
-
command: 'bee issue list -p PROJECT -k "login bug" --priority high'
|
|
42
|
-
},
|
|
43
|
-
{ description: "Output as JSON", command: "bee issue list -p PROJECT --json" }
|
|
44
|
-
]).action(async (opts) => {
|
|
45
|
-
const { client } = await getClient(opts.space);
|
|
46
|
-
const projectId = opts.project ? await resolveProjectIds(
|
|
47
|
-
client,
|
|
48
|
-
opts.project.split(",").map((s) => s.trim()).filter(Boolean)
|
|
49
|
-
) : [];
|
|
50
|
-
const assigneeId = await Promise.all(
|
|
51
|
-
(opts.assignee ?? []).map((id) => resolveUserId(client, id))
|
|
52
|
-
);
|
|
53
|
-
const statusId = opts.status;
|
|
54
|
-
const priorityId = opts.priority.length > 0 ? resolvePriorityIds(opts.priority) : [];
|
|
55
|
-
const issueTypeId = opts.type;
|
|
56
|
-
const categoryId = opts.category;
|
|
57
|
-
const versionId = opts.version;
|
|
58
|
-
const milestoneId = opts.milestone;
|
|
59
|
-
const resolutionId = opts.resolution;
|
|
60
|
-
const parentIssueId = opts.parentIssue;
|
|
61
|
-
const issues = await client.getIssues({
|
|
62
|
-
projectId,
|
|
63
|
-
assigneeId,
|
|
64
|
-
statusId,
|
|
65
|
-
priorityId,
|
|
66
|
-
issueTypeId,
|
|
67
|
-
categoryId,
|
|
68
|
-
versionId,
|
|
69
|
-
milestoneId,
|
|
70
|
-
resolutionId,
|
|
71
|
-
parentIssueId,
|
|
72
|
-
keyword: opts.keyword,
|
|
73
|
-
sort: opts.sort,
|
|
74
|
-
order: opts.order,
|
|
75
|
-
count: parseArg(v.optional(vInteger), opts.count, "--count"),
|
|
76
|
-
offset: parseArg(v.optional(vInteger), opts.offset, "--offset"),
|
|
77
|
-
createdSince: opts.createdSince,
|
|
78
|
-
createdUntil: opts.createdUntil,
|
|
79
|
-
updatedSince: opts.updatedSince,
|
|
80
|
-
updatedUntil: opts.updatedUntil,
|
|
81
|
-
startDateSince: opts.startSince,
|
|
82
|
-
startDateUntil: opts.startUntil,
|
|
83
|
-
dueDateSince: opts.dueSince,
|
|
84
|
-
dueDateUntil: opts.dueUntil
|
|
85
|
-
});
|
|
86
|
-
outputResult(issues, { json: opts.json }, (data) => {
|
|
87
|
-
if (data.length === 0) {
|
|
88
|
-
consola.info("No issues found.");
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
const rows = data.map((issue) => [
|
|
92
|
-
{ header: "KEY", value: issue.issueKey },
|
|
93
|
-
{ header: "STATUS", value: issue.status?.name ?? "" },
|
|
94
|
-
{ header: "TYPE", value: issue.issueType?.name ?? "" },
|
|
95
|
-
{ header: "PRIORITY", value: issue.priority?.name ?? "" },
|
|
96
|
-
{ header: "ASSIGNEE", value: issue.assignee?.name ?? "Unassigned" },
|
|
97
|
-
{ header: "SUMMARY", value: issue.summary }
|
|
98
|
-
]);
|
|
99
|
-
printTable(rows);
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
export { list as default };
|
package/dist/chunks/list3.mjs
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
2
|
-
import { r as resolveProjectIds } from '../shared/bee.084B_7FC.mjs';
|
|
3
|
-
import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
4
|
-
import 'node:stream/consumers';
|
|
5
|
-
import * as v from 'valibot';
|
|
6
|
-
import { safeParse } from 'valibot';
|
|
7
|
-
import { a as vFiniteNumber, p as parseArg, v as vInteger } from '../index.mjs';
|
|
8
|
-
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
9
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
10
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
11
|
-
import 'backlog-js';
|
|
12
|
-
import 'node:http';
|
|
13
|
-
import 'open';
|
|
14
|
-
import 'node:child_process';
|
|
15
|
-
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.KteAW2rM.mjs';
|
|
16
|
-
import { d as project, k as keyword, o as order, g as count, i as offset, j as json, s as space, r as resolveOptions } from '../shared/bee.CHtg3F43.mjs';
|
|
17
|
-
import 'node:fs';
|
|
18
|
-
import 'node:path';
|
|
19
|
-
import 'node:os';
|
|
20
|
-
import 'node:module';
|
|
21
|
-
import 'commander';
|
|
22
|
-
import 'consola/utils';
|
|
23
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
24
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
25
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
26
|
-
|
|
27
|
-
const splitArg = (input, schema) => {
|
|
28
|
-
if (!input) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
const parts = input.split(",").map((s) => s.trim()).filter(Boolean);
|
|
32
|
-
const results = [];
|
|
33
|
-
for (const part of parts) {
|
|
34
|
-
const result = safeParse(schema, part);
|
|
35
|
-
if (result.success) {
|
|
36
|
-
results.push(result.output);
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
const numResult = safeParse(vFiniteNumber, part);
|
|
40
|
-
if (numResult.success) {
|
|
41
|
-
const schemaResult = safeParse(schema, numResult.output);
|
|
42
|
-
if (schemaResult.success) {
|
|
43
|
-
results.push(schemaResult.output);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return results;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const list = new BeeCommand("list").summary("List documents").description(`Use \`--keyword\` to search within document titles and content.`).addOption(project()).addOption(keyword()).option("--sort <field>", "Sort field {created|updated}").addOption(order()).addOption(count()).addOption(offset()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
51
|
-
{ description: "List documents in a project", command: "bee document list -p PROJECT" },
|
|
52
|
-
{
|
|
53
|
-
description: "Search documents by keyword",
|
|
54
|
-
command: 'bee document list -p PROJECT -k "meeting notes"'
|
|
55
|
-
},
|
|
56
|
-
{ description: "Output as JSON", command: "bee document list -p PROJECT --json" }
|
|
57
|
-
]).action(async (opts, cmd) => {
|
|
58
|
-
await resolveOptions(cmd);
|
|
59
|
-
const { client } = await getClient(opts.space);
|
|
60
|
-
const projectId = await resolveProjectIds(client, splitArg(opts.project, v.string()));
|
|
61
|
-
const documents = await client.getDocuments({
|
|
62
|
-
projectId,
|
|
63
|
-
keyword: opts.keyword,
|
|
64
|
-
sort: opts.sort,
|
|
65
|
-
order: opts.order,
|
|
66
|
-
count: parseArg(v.optional(vInteger), opts.count, "--count"),
|
|
67
|
-
offset: parseArg(v.optional(vInteger), opts.offset, "--offset") ?? 0
|
|
68
|
-
});
|
|
69
|
-
const json = opts.json === true ? "" : opts.json;
|
|
70
|
-
outputResult(documents, { json }, (data) => {
|
|
71
|
-
if (data.length === 0) {
|
|
72
|
-
consola.info("No documents found.");
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const rows = data.map((doc) => [
|
|
76
|
-
{ header: "ID", value: doc.id },
|
|
77
|
-
{ header: "EMOJI", value: doc.emoji ?? "" },
|
|
78
|
-
{ header: "TITLE", value: doc.title },
|
|
79
|
-
{ header: "UPDATED", value: formatDate(doc.updated) }
|
|
80
|
-
]);
|
|
81
|
-
printTable(rows);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
export { list as default };
|
package/dist/chunks/list4.mjs
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import consola from 'consola';
|
|
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 '../index.mjs';
|
|
6
|
-
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
7
|
-
import { p as printTable } from '../shared/bee.a05kNWpn.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.RsR9yniy.mjs';
|
|
9
|
-
import 'backlog-js';
|
|
10
|
-
import 'node:http';
|
|
11
|
-
import 'open';
|
|
12
|
-
import 'node:child_process';
|
|
13
|
-
import { B as BeeCommand, E as ENV_AUTH } from '../shared/bee.KteAW2rM.mjs';
|
|
14
|
-
import { g as count, A as minId, B as maxId, o as order, j as json, s as space } from '../shared/bee.CHtg3F43.mjs';
|
|
15
|
-
import 'node:fs';
|
|
16
|
-
import 'node:path';
|
|
17
|
-
import 'node:os';
|
|
18
|
-
import 'node:module';
|
|
19
|
-
import 'commander';
|
|
20
|
-
import 'consola/utils';
|
|
21
|
-
import '../shared/bee.DFnSWb6q.mjs';
|
|
22
|
-
import '../shared/bee.CktwmH8R.mjs';
|
|
23
|
-
import '../shared/bee.CAARNIp6.mjs';
|
|
24
|
-
|
|
25
|
-
const NOTIFICATION_REASON_LABELS = {
|
|
26
|
-
1: "Assigned",
|
|
27
|
-
2: "Commented",
|
|
28
|
-
3: "Issue created",
|
|
29
|
-
4: "Issue updated",
|
|
30
|
-
5: "File attached",
|
|
31
|
-
6: "Project user added",
|
|
32
|
-
9: "Other",
|
|
33
|
-
10: "Pull request assigned",
|
|
34
|
-
11: "Pull request commented",
|
|
35
|
-
12: "Pull request added",
|
|
36
|
-
13: "Pull request updated",
|
|
37
|
-
14: "Comment mentioned",
|
|
38
|
-
15: "Pull request comment mentioned",
|
|
39
|
-
16: "Team mentioned",
|
|
40
|
-
17: "Team mentioned in PR"
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const list = new BeeCommand("list").summary("List notifications").description(
|
|
44
|
-
`Unread notifications are marked with \`*\`. Use \`--min-id\` / \`--max-id\` for cursor-based pagination.`
|
|
45
|
-
).addOption(count()).addOption(minId()).addOption(maxId()).addOption(order()).addOption(json()).addOption(space()).envVars([...ENV_AUTH]).examples([
|
|
46
|
-
{ description: "List recent notifications", command: "bee notification list" },
|
|
47
|
-
{ description: "List the last 5 notifications", command: "bee notification list --count 5" },
|
|
48
|
-
{
|
|
49
|
-
description: "List notifications in ascending order",
|
|
50
|
-
command: "bee notification list --order asc"
|
|
51
|
-
},
|
|
52
|
-
{ description: "Output as JSON", command: "bee notification list --json" }
|
|
53
|
-
]).action(async (opts) => {
|
|
54
|
-
const { client } = await getClient(opts.space);
|
|
55
|
-
const notifications = await client.getNotifications({
|
|
56
|
-
count: parseArg(v.optional(vInteger), opts.count, "--count"),
|
|
57
|
-
minId: parseArg(v.optional(vInteger), opts.minId, "--min-id"),
|
|
58
|
-
maxId: parseArg(v.optional(vInteger), opts.maxId, "--max-id"),
|
|
59
|
-
order: opts.order
|
|
60
|
-
});
|
|
61
|
-
outputResult(notifications, opts, (data) => {
|
|
62
|
-
if (data.length === 0) {
|
|
63
|
-
consola.info("No notifications found.");
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const rows = data.map((n) => [
|
|
67
|
-
{ header: "", value: n.alreadyRead ? " " : "*" },
|
|
68
|
-
{ header: "ID", value: String(n.id) },
|
|
69
|
-
{ header: "REASON", value: NOTIFICATION_REASON_LABELS[n.reason] ?? String(n.reason) },
|
|
70
|
-
{ header: "ISSUE", value: n.issue?.issueKey ?? "-" },
|
|
71
|
-
{ header: "SUMMARY", value: n.issue?.summary ?? "-" },
|
|
72
|
-
{ header: "SENDER", value: n.sender.name },
|
|
73
|
-
{ header: "DATE", value: formatDate(n.created) }
|
|
74
|
-
]);
|
|
75
|
-
printTable(rows);
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
export { list as default };
|