@nulab/bee 1.0.0-rc.2 → 1.0.0-rc.3
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/LICENSE +21 -0
- package/dist/chunks/activities.mjs +14 -11
- package/dist/chunks/activities2.mjs +6 -4
- package/dist/chunks/activities3.mjs +6 -4
- package/dist/chunks/add-user.mjs +6 -4
- package/dist/chunks/add.mjs +6 -4
- package/dist/chunks/add2.mjs +6 -4
- package/dist/chunks/api.mjs +6 -4
- package/dist/chunks/attachments.mjs +6 -4
- package/dist/chunks/attachments2.mjs +6 -4
- package/dist/chunks/attachments3.mjs +6 -4
- package/dist/chunks/browse.mjs +9 -7
- package/dist/chunks/clone.mjs +6 -4
- package/dist/chunks/close.mjs +6 -4
- package/dist/chunks/comment.mjs +8 -6
- package/dist/chunks/comment2.mjs +6 -4
- package/dist/chunks/comments.mjs +6 -4
- package/dist/chunks/completion.mjs +1 -1
- package/dist/chunks/count.mjs +6 -4
- package/dist/chunks/count2.mjs +6 -4
- package/dist/chunks/count3.mjs +6 -4
- package/dist/chunks/count4.mjs +12 -9
- package/dist/chunks/count5.mjs +6 -4
- package/dist/chunks/create.mjs +6 -4
- package/dist/chunks/create2.mjs +6 -4
- package/dist/chunks/create3.mjs +6 -4
- package/dist/chunks/create4.mjs +6 -4
- package/dist/chunks/create5.mjs +6 -4
- package/dist/chunks/create6.mjs +6 -4
- package/dist/chunks/create7.mjs +6 -4
- package/dist/chunks/create8.mjs +6 -4
- package/dist/chunks/create9.mjs +6 -4
- package/dist/chunks/dashboard.mjs +6 -4
- package/dist/chunks/delete.mjs +13 -10
- package/dist/chunks/delete2.mjs +7 -5
- package/dist/chunks/delete3.mjs +7 -5
- package/dist/chunks/delete4.mjs +7 -5
- package/dist/chunks/delete5.mjs +7 -5
- package/dist/chunks/delete6.mjs +7 -5
- package/dist/chunks/delete7.mjs +7 -5
- package/dist/chunks/delete8.mjs +7 -5
- package/dist/chunks/delete9.mjs +7 -5
- package/dist/chunks/edit.mjs +13 -10
- package/dist/chunks/edit2.mjs +6 -4
- package/dist/chunks/edit3.mjs +6 -4
- package/dist/chunks/edit4.mjs +6 -4
- package/dist/chunks/edit5.mjs +6 -4
- package/dist/chunks/edit6.mjs +6 -4
- package/dist/chunks/edit7.mjs +6 -4
- package/dist/chunks/edit8.mjs +6 -4
- package/dist/chunks/history.mjs +6 -4
- package/dist/chunks/index.mjs +1 -1
- package/dist/chunks/index10.mjs +1 -1
- package/dist/chunks/index11.mjs +1 -1
- package/dist/chunks/index12.mjs +1 -1
- package/dist/chunks/index13.mjs +1 -1
- package/dist/chunks/index14.mjs +1 -1
- package/dist/chunks/index15.mjs +1 -1
- package/dist/chunks/index16.mjs +1 -1
- package/dist/chunks/index17.mjs +1 -1
- package/dist/chunks/index2.mjs +1 -1
- package/dist/chunks/index3.mjs +1 -1
- package/dist/chunks/index4.mjs +1 -1
- package/dist/chunks/index5.mjs +1 -1
- package/dist/chunks/index6.mjs +1 -1
- package/dist/chunks/index7.mjs +1 -1
- package/dist/chunks/index8.mjs +1 -1
- package/dist/chunks/index9.mjs +1 -1
- package/dist/chunks/list.mjs +6 -4
- package/dist/chunks/list10.mjs +12 -9
- package/dist/chunks/list11.mjs +12 -9
- package/dist/chunks/list12.mjs +12 -9
- package/dist/chunks/list13.mjs +12 -9
- package/dist/chunks/list14.mjs +6 -4
- package/dist/chunks/list15.mjs +6 -4
- package/dist/chunks/list2.mjs +6 -4
- package/dist/chunks/list3.mjs +6 -4
- package/dist/chunks/list4.mjs +6 -4
- package/dist/chunks/list5.mjs +6 -4
- package/dist/chunks/list6.mjs +12 -9
- package/dist/chunks/list7.mjs +6 -4
- package/dist/chunks/list8.mjs +6 -4
- package/dist/chunks/list9.mjs +13 -10
- package/dist/chunks/login.mjs +5 -3
- package/dist/chunks/logout.mjs +20 -4
- package/dist/chunks/me.mjs +6 -4
- package/dist/chunks/read-all.mjs +6 -4
- package/dist/chunks/read.mjs +6 -4
- package/dist/chunks/read2.mjs +6 -4
- package/dist/chunks/refresh.mjs +5 -3
- package/dist/chunks/remove-user.mjs +6 -4
- package/dist/chunks/remove.mjs +6 -4
- package/dist/chunks/reopen.mjs +6 -4
- package/dist/chunks/status.mjs +2 -2
- package/dist/chunks/status2.mjs +6 -4
- package/dist/chunks/status3.mjs +6 -4
- package/dist/chunks/switch.mjs +2 -2
- package/dist/chunks/tags.mjs +12 -9
- package/dist/chunks/token.mjs +3 -3
- package/dist/chunks/tree.mjs +12 -9
- package/dist/chunks/users.mjs +12 -9
- package/dist/chunks/view.mjs +15 -12
- package/dist/chunks/view2.mjs +6 -4
- package/dist/chunks/view3.mjs +6 -4
- package/dist/chunks/view4.mjs +6 -4
- package/dist/chunks/view5.mjs +6 -4
- package/dist/chunks/view6.mjs +6 -4
- package/dist/chunks/view7.mjs +6 -4
- package/dist/chunks/view8.mjs +6 -4
- package/dist/chunks/view9.mjs +6 -4
- package/dist/index.mjs +61 -4
- package/dist/shared/{bee.B4OxR0DJ.mjs → bee.Bt1TK6yh.mjs} +5 -3
- package/dist/shared/bee.BtxMsVL4.mjs +35104 -0
- package/dist/shared/{bee.riolf-_Y.mjs → bee.DxRKWv6n.mjs} +9 -2
- package/dist/shared/{bee.BCBBmkOy.mjs → bee.OJ0vqxJN.mjs} +2 -2
- package/dist/shared/{bee.CQ3kBgas.mjs → bee.bmiIlr9W.mjs} +5 -0
- package/package.json +15 -15
package/dist/chunks/tags.mjs
CHANGED
|
@@ -3,15 +3,17 @@ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
|
3
3
|
import 'node:stream/consumers';
|
|
4
4
|
import 'valibot';
|
|
5
5
|
import '../shared/bee.BYqxm3yG.mjs';
|
|
6
|
-
import { g as getClient } from '../shared/bee.
|
|
6
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
7
7
|
import 'backlog-js';
|
|
8
8
|
import 'node:http';
|
|
9
9
|
import 'open';
|
|
10
10
|
import 'node:child_process';
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
11
|
+
import '../shared/bee.BtxMsVL4.mjs';
|
|
12
|
+
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.bmiIlr9W.mjs';
|
|
13
|
+
import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.Bt1TK6yh.mjs';
|
|
13
14
|
import '../shared/bee.CktwmH8R.mjs';
|
|
14
|
-
import '../shared/bee.
|
|
15
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
16
|
+
import 'node:module';
|
|
15
17
|
import 'commander';
|
|
16
18
|
import 'consola/utils';
|
|
17
19
|
import 'node:fs';
|
|
@@ -19,12 +21,13 @@ import 'node:path';
|
|
|
19
21
|
import 'node:os';
|
|
20
22
|
import '../shared/bee.BeQSH2t0.mjs';
|
|
21
23
|
|
|
22
|
-
const tags = new BeeCommand("tags").summary("List wiki tags").description(`Tags are labels attached to wiki pages for organization.`).
|
|
23
|
-
{ description: "List wiki tags", command: "bee wiki tags PROJECT" },
|
|
24
|
-
{ description: "Output as JSON", command: "bee wiki tags PROJECT --json" }
|
|
25
|
-
]).action(async (
|
|
24
|
+
const tags = new BeeCommand("tags").summary("List wiki tags").description(`Tags are labels attached to wiki pages for organization.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
25
|
+
{ description: "List wiki tags", command: "bee wiki tags -p PROJECT" },
|
|
26
|
+
{ description: "Output as JSON", command: "bee wiki tags -p PROJECT --json" }
|
|
27
|
+
]).action(async (opts, cmd) => {
|
|
28
|
+
await resolveOptions(cmd);
|
|
26
29
|
const { client } = await getClient(opts.space);
|
|
27
|
-
const result = await client.getWikisTags(project);
|
|
30
|
+
const result = await client.getWikisTags(opts.project);
|
|
28
31
|
const json = opts.json === true ? "" : opts.json;
|
|
29
32
|
outputResult(result, { json }, (data) => {
|
|
30
33
|
if (data.length === 0) {
|
package/dist/chunks/token.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import 'consola';
|
|
|
2
2
|
import { U as UserError } from '../shared/bee.BYqxm3yG.mjs';
|
|
3
3
|
import 'node:stream/consumers';
|
|
4
4
|
import 'valibot';
|
|
5
|
-
import { s as space, l as loadConfig } from '../shared/bee.
|
|
6
|
-
import { f as findSpace } from '../shared/bee.
|
|
7
|
-
import { B as BeeCommand } from '../shared/bee.
|
|
5
|
+
import { s as space, l as loadConfig } from '../shared/bee.Bt1TK6yh.mjs';
|
|
6
|
+
import { f as findSpace } from '../shared/bee.DxRKWv6n.mjs';
|
|
7
|
+
import { B as BeeCommand } from '../shared/bee.bmiIlr9W.mjs';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'node:os';
|
package/dist/chunks/tree.mjs
CHANGED
|
@@ -3,15 +3,17 @@ import { o as outputResult } from '../shared/bee.BTBGpv4K.mjs';
|
|
|
3
3
|
import 'node:stream/consumers';
|
|
4
4
|
import 'valibot';
|
|
5
5
|
import '../shared/bee.BYqxm3yG.mjs';
|
|
6
|
-
import { g as getClient } from '../shared/bee.
|
|
6
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
7
7
|
import 'backlog-js';
|
|
8
8
|
import 'node:http';
|
|
9
9
|
import 'open';
|
|
10
10
|
import 'node:child_process';
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
11
|
+
import '../shared/bee.BtxMsVL4.mjs';
|
|
12
|
+
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.bmiIlr9W.mjs';
|
|
13
|
+
import { p as project, j as json, s as space, r as resolveOptions } from '../shared/bee.Bt1TK6yh.mjs';
|
|
13
14
|
import '../shared/bee.CktwmH8R.mjs';
|
|
14
|
-
import '../shared/bee.
|
|
15
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
16
|
+
import 'node:module';
|
|
15
17
|
import 'commander';
|
|
16
18
|
import 'consola/utils';
|
|
17
19
|
import 'node:fs';
|
|
@@ -39,12 +41,13 @@ const renderTree = (children) => {
|
|
|
39
41
|
}
|
|
40
42
|
return lines;
|
|
41
43
|
};
|
|
42
|
-
const tree = new BeeCommand("tree").summary("Display document tree").description(`Shows the hierarchical structure of documents with tree-style indentation.`).
|
|
43
|
-
{ description: "Show document tree", command: "bee document tree PROJECT" },
|
|
44
|
-
{ description: "Output as JSON", command: "bee document tree PROJECT --json" }
|
|
45
|
-
]).action(async (
|
|
44
|
+
const tree = new BeeCommand("tree").summary("Display document tree").description(`Shows the hierarchical structure of documents with tree-style indentation.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
45
|
+
{ description: "Show document tree", command: "bee document tree -p PROJECT" },
|
|
46
|
+
{ description: "Output as JSON", command: "bee document tree -p PROJECT --json" }
|
|
47
|
+
]).action(async (opts, cmd) => {
|
|
48
|
+
await resolveOptions(cmd);
|
|
46
49
|
const { client } = await getClient(opts.space);
|
|
47
|
-
const docTree = await client.getDocumentTree(project);
|
|
50
|
+
const docTree = await client.getDocumentTree(opts.project);
|
|
48
51
|
outputResult(docTree, opts, (data) => {
|
|
49
52
|
if (!data.activeTree || data.activeTree.children.length === 0) {
|
|
50
53
|
consola.info("No documents found.");
|
package/dist/chunks/users.mjs
CHANGED
|
@@ -5,16 +5,18 @@ import 'valibot';
|
|
|
5
5
|
import '../shared/bee.BYqxm3yG.mjs';
|
|
6
6
|
import { p as printTable } from '../shared/bee.IM3QELRf.mjs';
|
|
7
7
|
import { R as ROLE_LABELS } from '../shared/bee.BXiuAfjJ.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
9
9
|
import 'backlog-js';
|
|
10
10
|
import 'node:http';
|
|
11
11
|
import 'open';
|
|
12
12
|
import 'node:child_process';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
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, j as json, s as space, r as resolveOptions } from '../shared/bee.Bt1TK6yh.mjs';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
19
|
+
import 'node:module';
|
|
18
20
|
import 'commander';
|
|
19
21
|
import 'consola/utils';
|
|
20
22
|
import 'node:fs';
|
|
@@ -22,12 +24,13 @@ import 'node:path';
|
|
|
22
24
|
import 'node:os';
|
|
23
25
|
import '../shared/bee.BeQSH2t0.mjs';
|
|
24
26
|
|
|
25
|
-
const users = new BeeCommand("users").summary("List project users").description(`Displays each member's ID, name, and role.`).
|
|
26
|
-
{ description: "List project members", command: "bee project users PROJECT_KEY" },
|
|
27
|
-
{ description: "Output as JSON", command: "bee project users PROJECT_KEY --json" }
|
|
28
|
-
]).action(async (
|
|
27
|
+
const users = new BeeCommand("users").summary("List project users").description(`Displays each member's ID, name, and role.`).addOption(project()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
28
|
+
{ description: "List project members", command: "bee project users -p PROJECT_KEY" },
|
|
29
|
+
{ description: "Output as JSON", command: "bee project users -p PROJECT_KEY --json" }
|
|
30
|
+
]).action(async (opts, cmd) => {
|
|
31
|
+
await resolveOptions(cmd);
|
|
29
32
|
const { client } = await getClient(opts.space);
|
|
30
|
-
const members = await client.getProjectUsers(project);
|
|
33
|
+
const members = await client.getProjectUsers(opts.project);
|
|
31
34
|
const jsonArg = opts.json === true ? "" : opts.json;
|
|
32
35
|
outputResult(members, { ...opts, json: jsonArg }, (data) => {
|
|
33
36
|
if (data.length === 0) {
|
package/dist/chunks/view.mjs
CHANGED
|
@@ -4,17 +4,19 @@ import 'node:stream/consumers';
|
|
|
4
4
|
import 'valibot';
|
|
5
5
|
import '../shared/bee.BYqxm3yG.mjs';
|
|
6
6
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.
|
|
7
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
8
8
|
import 'backlog-js';
|
|
9
9
|
import 'node:http';
|
|
10
|
-
import {
|
|
10
|
+
import { p as projectUrl, o as openOrPrintUrl } from '../shared/bee.CzKcWSES.mjs';
|
|
11
11
|
import 'node:child_process';
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
12
|
+
import '../shared/bee.BtxMsVL4.mjs';
|
|
13
|
+
import { B as BeeCommand, E as ENV_AUTH, a as ENV_PROJECT } from '../shared/bee.bmiIlr9W.mjs';
|
|
14
|
+
import { p as project, w as web, n as noBrowser, j as json, s as space, r as resolveOptions } from '../shared/bee.Bt1TK6yh.mjs';
|
|
14
15
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
15
16
|
import '../shared/bee.CktwmH8R.mjs';
|
|
16
|
-
import '../shared/bee.
|
|
17
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
17
18
|
import 'open';
|
|
19
|
+
import 'node:module';
|
|
18
20
|
import 'commander';
|
|
19
21
|
import 'consola/utils';
|
|
20
22
|
import 'node:fs';
|
|
@@ -22,18 +24,19 @@ import 'node:path';
|
|
|
22
24
|
import 'node:os';
|
|
23
25
|
import '../shared/bee.BeQSH2t0.mjs';
|
|
24
26
|
|
|
25
|
-
const view = new BeeCommand("view").summary("View a project").description(`Use \`--web\` to open in the browser.`).
|
|
26
|
-
{ description: "View project details", command: "bee project view PROJECT_KEY" },
|
|
27
|
-
{ description: "Open project in browser", command: "bee project view PROJECT_KEY --web" },
|
|
28
|
-
{ description: "Output as JSON", command: "bee project view PROJECT_KEY --json" }
|
|
29
|
-
]).action(async (
|
|
27
|
+
const view = new BeeCommand("view").summary("View a project").description(`Use \`--web\` to open in the browser.`).addOption(project()).addOption(web("project")).addOption(noBrowser()).addOption(json()).addOption(space()).envVars([...ENV_AUTH, ENV_PROJECT]).examples([
|
|
28
|
+
{ description: "View project details", command: "bee project view -p PROJECT_KEY" },
|
|
29
|
+
{ description: "Open project in browser", command: "bee project view -p PROJECT_KEY --web" },
|
|
30
|
+
{ description: "Output as JSON", command: "bee project view -p PROJECT_KEY --json" }
|
|
31
|
+
]).action(async (opts, cmd) => {
|
|
32
|
+
await resolveOptions(cmd);
|
|
30
33
|
const { client, host } = await getClient(opts.space);
|
|
31
34
|
if (opts.web || opts.browser === false) {
|
|
32
|
-
const url = projectUrl(host, project);
|
|
35
|
+
const url = projectUrl(host, opts.project);
|
|
33
36
|
await openOrPrintUrl(url, opts.browser === false, consola);
|
|
34
37
|
return;
|
|
35
38
|
}
|
|
36
|
-
const projectData = await client.getProject(project);
|
|
39
|
+
const projectData = await client.getProject(opts.project);
|
|
37
40
|
const jsonArg = opts.json === true ? "" : opts.json;
|
|
38
41
|
outputResult(projectData, { ...opts, json: jsonArg }, (data) => {
|
|
39
42
|
consola.log("");
|
package/dist/chunks/view2.mjs
CHANGED
|
@@ -5,17 +5,19 @@ import 'valibot';
|
|
|
5
5
|
import '../shared/bee.BYqxm3yG.mjs';
|
|
6
6
|
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
7
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
9
9
|
import 'backlog-js';
|
|
10
10
|
import 'node:http';
|
|
11
11
|
import { o as openOrPrintUrl, i as issueUrl } from '../shared/bee.CzKcWSES.mjs';
|
|
12
12
|
import 'node:child_process';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
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';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
18
19
|
import 'open';
|
|
20
|
+
import 'node:module';
|
|
19
21
|
import 'commander';
|
|
20
22
|
import 'consola/utils';
|
|
21
23
|
import 'node:fs';
|
package/dist/chunks/view3.mjs
CHANGED
|
@@ -5,17 +5,19 @@ import 'node:stream/consumers';
|
|
|
5
5
|
import 'valibot';
|
|
6
6
|
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
7
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.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
|
|
14
|
-
import {
|
|
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';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
18
19
|
import 'open';
|
|
20
|
+
import 'node:module';
|
|
19
21
|
import 'commander';
|
|
20
22
|
import 'consola/utils';
|
|
21
23
|
import 'node:fs';
|
package/dist/chunks/view4.mjs
CHANGED
|
@@ -5,17 +5,19 @@ 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
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.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
|
|
14
|
-
import {
|
|
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';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
18
19
|
import 'open';
|
|
20
|
+
import 'node:module';
|
|
19
21
|
import 'commander';
|
|
20
22
|
import 'consola/utils';
|
|
21
23
|
import 'node:fs';
|
package/dist/chunks/view5.mjs
CHANGED
|
@@ -5,17 +5,19 @@ import 'valibot';
|
|
|
5
5
|
import '../shared/bee.BYqxm3yG.mjs';
|
|
6
6
|
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
7
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.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
|
|
14
|
-
import {
|
|
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';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
18
19
|
import 'open';
|
|
20
|
+
import 'node:module';
|
|
19
21
|
import 'commander';
|
|
20
22
|
import 'consola/utils';
|
|
21
23
|
import 'node:fs';
|
package/dist/chunks/view6.mjs
CHANGED
|
@@ -4,16 +4,18 @@ 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 { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
7
|
-
import { g as getClient } from '../shared/bee.
|
|
7
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
8
8
|
import 'backlog-js';
|
|
9
9
|
import 'node:http';
|
|
10
10
|
import 'open';
|
|
11
11
|
import 'node:child_process';
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
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';
|
|
14
15
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
15
16
|
import '../shared/bee.CktwmH8R.mjs';
|
|
16
|
-
import '../shared/bee.
|
|
17
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
18
|
+
import 'node:module';
|
|
17
19
|
import 'commander';
|
|
18
20
|
import 'consola/utils';
|
|
19
21
|
import 'node:fs';
|
package/dist/chunks/view7.mjs
CHANGED
|
@@ -6,16 +6,18 @@ import { p as parseArg, v as vInteger } from '../shared/bee.BYqxm3yG.mjs';
|
|
|
6
6
|
import { f as formatDate } from '../shared/bee.n5MYN4a6.mjs';
|
|
7
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
8
|
import { R as ROLE_LABELS } from '../shared/bee.BXiuAfjJ.mjs';
|
|
9
|
-
import { g as getClient } from '../shared/bee.
|
|
9
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
10
10
|
import 'backlog-js';
|
|
11
11
|
import 'node:http';
|
|
12
12
|
import 'open';
|
|
13
13
|
import 'node:child_process';
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
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';
|
|
16
17
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
17
18
|
import '../shared/bee.CktwmH8R.mjs';
|
|
18
|
-
import '../shared/bee.
|
|
19
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
20
|
+
import 'node:module';
|
|
19
21
|
import 'commander';
|
|
20
22
|
import 'consola/utils';
|
|
21
23
|
import 'node:fs';
|
package/dist/chunks/view8.mjs
CHANGED
|
@@ -5,17 +5,19 @@ 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
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.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
|
|
14
|
-
import {
|
|
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';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
18
19
|
import 'open';
|
|
20
|
+
import 'node:module';
|
|
19
21
|
import 'commander';
|
|
20
22
|
import 'consola/utils';
|
|
21
23
|
import 'node:fs';
|
package/dist/chunks/view9.mjs
CHANGED
|
@@ -5,16 +5,18 @@ 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
7
|
import { p as printDefinitionList } from '../shared/bee.D6yQ6Pqf.mjs';
|
|
8
|
-
import { g as getClient } from '../shared/bee.
|
|
8
|
+
import { g as getClient } from '../shared/bee.OJ0vqxJN.mjs';
|
|
9
9
|
import 'backlog-js';
|
|
10
10
|
import 'node:http';
|
|
11
11
|
import 'open';
|
|
12
12
|
import 'node:child_process';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
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';
|
|
15
16
|
import '../shared/bee.Ds2l-nTJ.mjs';
|
|
16
17
|
import '../shared/bee.CktwmH8R.mjs';
|
|
17
|
-
import '../shared/bee.
|
|
18
|
+
import '../shared/bee.DxRKWv6n.mjs';
|
|
19
|
+
import 'node:module';
|
|
18
20
|
import 'commander';
|
|
19
21
|
import 'consola/utils';
|
|
20
22
|
import 'node:fs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import consola, { LogLevels } from 'consola';
|
|
2
|
-
import { B as BeeCommand } from './shared/bee.CQ3kBgas.mjs';
|
|
3
|
-
import { CommanderError } from 'commander';
|
|
4
|
-
import { U as UserError } from './shared/bee.BYqxm3yG.mjs';
|
|
5
2
|
import 'node:stream/consumers';
|
|
6
3
|
import { ValiError, flatten } from 'valibot';
|
|
4
|
+
import { U as UserError } from './shared/bee.BYqxm3yG.mjs';
|
|
7
5
|
import 'backlog-js';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:path';
|
|
8
|
+
import 'node:os';
|
|
8
9
|
import './shared/bee.BeQSH2t0.mjs';
|
|
9
10
|
import 'node:http';
|
|
10
11
|
import 'open';
|
|
11
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';
|
|
15
|
+
import { CommanderError } from 'commander';
|
|
16
|
+
import 'node:module';
|
|
12
17
|
import 'consola/utils';
|
|
13
18
|
|
|
14
19
|
const errorCodeNames = {
|
|
@@ -97,6 +102,57 @@ const handleValidationError = (error) => {
|
|
|
97
102
|
return true;
|
|
98
103
|
};
|
|
99
104
|
|
|
105
|
+
const maskSensitiveParams = (url) => url.replaceAll(/([?&])(apiKey)=[^&]*/gi, "$1$2=***");
|
|
106
|
+
const formatPath = (path) => {
|
|
107
|
+
try {
|
|
108
|
+
return decodeURIComponent(maskSensitiveParams(path));
|
|
109
|
+
} catch {
|
|
110
|
+
return maskSensitiveParams(path);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const createLoggingInterceptor = () => {
|
|
114
|
+
let originLogged = false;
|
|
115
|
+
return (dispatch) => (opts, handler) => {
|
|
116
|
+
const origin = opts.origin?.toString() ?? "";
|
|
117
|
+
if (!originLogged && origin) {
|
|
118
|
+
consola.debug(`API host: ${origin}`);
|
|
119
|
+
originLogged = true;
|
|
120
|
+
}
|
|
121
|
+
const method = opts.method ?? "UNKNOWN";
|
|
122
|
+
const path = formatPath(opts.path ?? "");
|
|
123
|
+
const start = performance.now();
|
|
124
|
+
consola.debug(`\u2192 ${method} ${path}`);
|
|
125
|
+
return dispatch(opts, {
|
|
126
|
+
onRequestStart(controller, context) {
|
|
127
|
+
handler.onRequestStart?.(controller, context);
|
|
128
|
+
},
|
|
129
|
+
onRequestUpgrade(controller, statusCode, headers, socket) {
|
|
130
|
+
handler.onRequestUpgrade?.(controller, statusCode, headers, socket);
|
|
131
|
+
},
|
|
132
|
+
onResponseStart(controller, statusCode, headers, statusMessage) {
|
|
133
|
+
const elapsed = Math.round(performance.now() - start);
|
|
134
|
+
consola.debug(`\u2190 ${statusCode} ${method} ${path} (${elapsed}ms)`);
|
|
135
|
+
handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
|
|
136
|
+
},
|
|
137
|
+
onResponseData(controller, data) {
|
|
138
|
+
handler.onResponseData?.(controller, data);
|
|
139
|
+
},
|
|
140
|
+
onResponseEnd(controller, trailers) {
|
|
141
|
+
handler.onResponseEnd?.(controller, trailers);
|
|
142
|
+
},
|
|
143
|
+
onResponseError(controller, err) {
|
|
144
|
+
const elapsed = Math.round(performance.now() - start);
|
|
145
|
+
consola.debug(`\u2717 ${method} ${path} (${elapsed}ms)`);
|
|
146
|
+
handler.onResponseError?.(controller, err);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
const installHttpLogger = () => {
|
|
152
|
+
const agent = new undiciExports.Agent().compose(createLoggingInterceptor());
|
|
153
|
+
undiciExports.setGlobalDispatcher(agent);
|
|
154
|
+
};
|
|
155
|
+
|
|
100
156
|
const handleError = (error) => {
|
|
101
157
|
if (error instanceof CommanderError) {
|
|
102
158
|
if (error.exitCode === 0) {
|
|
@@ -114,13 +170,14 @@ const handleError = (error) => {
|
|
|
114
170
|
process.exit(1);
|
|
115
171
|
};
|
|
116
172
|
|
|
117
|
-
const version = "1.0.0-rc.
|
|
173
|
+
const version = "1.0.0-rc.3";
|
|
118
174
|
const description = "Bring Backlog to your command line";
|
|
119
175
|
const pkg = {
|
|
120
176
|
version: version,
|
|
121
177
|
description: description};
|
|
122
178
|
|
|
123
179
|
consola.options.formatOptions.date = false;
|
|
180
|
+
installHttpLogger();
|
|
124
181
|
const program = new BeeCommand("bee").version(pkg.version).description(pkg.description);
|
|
125
182
|
await program.addCommands([
|
|
126
183
|
import('./chunks/index.mjs'),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync, chmodSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
1
4
|
import consola from 'consola';
|
|
2
5
|
import { U as UserError, p as parseArg, v as vInteger } from './bee.BYqxm3yG.mjs';
|
|
3
6
|
import 'node:stream/consumers';
|
|
4
7
|
import * as v from 'valibot';
|
|
5
|
-
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
6
|
-
import { resolve } from 'node:path';
|
|
7
|
-
import { homedir } from 'node:os';
|
|
8
8
|
import { R as RcSchema } from './bee.BeQSH2t0.mjs';
|
|
9
9
|
import { Option } from 'commander';
|
|
10
10
|
|
|
@@ -264,8 +264,10 @@ ${details}`);
|
|
|
264
264
|
}
|
|
265
265
|
return result.output;
|
|
266
266
|
};
|
|
267
|
+
const configFilePath = () => resolve(process.env.XDG_CONFIG_HOME || homedir(), CONFIG_FILE_NAME);
|
|
267
268
|
const writeConfig = (config) => {
|
|
268
269
|
writeUser(config, CONFIG_FILE_NAME);
|
|
270
|
+
chmodSync(configFilePath(), 384);
|
|
269
271
|
};
|
|
270
272
|
const updateConfig = (updater) => {
|
|
271
273
|
const config = loadConfig();
|