@nulab/bee 1.0.0-rc.3 → 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.
- package/dist/chunks/activities.mjs +9 -24
- package/dist/chunks/activities2.mjs +9 -24
- package/dist/chunks/activities3.mjs +9 -24
- package/dist/chunks/add-user.mjs +6 -6
- package/dist/chunks/add.mjs +6 -6
- package/dist/chunks/add2.mjs +6 -6
- package/dist/chunks/api.mjs +48 -13
- package/dist/chunks/attachments.mjs +8 -8
- package/dist/chunks/attachments2.mjs +8 -8
- package/dist/chunks/attachments3.mjs +8 -8
- package/dist/chunks/browse.mjs +7 -7
- package/dist/chunks/clone.mjs +6 -6
- package/dist/chunks/close.mjs +6 -6
- package/dist/chunks/comment.mjs +8 -8
- package/dist/chunks/comment2.mjs +8 -8
- package/dist/chunks/comments.mjs +6 -6
- package/dist/chunks/completion.mjs +1 -1
- package/dist/chunks/count.mjs +8 -13
- package/dist/chunks/count2.mjs +6 -6
- package/dist/chunks/count3.mjs +6 -6
- package/dist/chunks/count4.mjs +6 -6
- package/dist/chunks/count5.mjs +6 -6
- package/dist/chunks/create.mjs +6 -6
- package/dist/chunks/create2.mjs +8 -8
- package/dist/chunks/create3.mjs +7 -7
- package/dist/chunks/create4.mjs +6 -6
- package/dist/chunks/create5.mjs +7 -7
- package/dist/chunks/create6.mjs +6 -6
- package/dist/chunks/create7.mjs +6 -6
- package/dist/chunks/create8.mjs +6 -6
- package/dist/chunks/create9.mjs +6 -6
- package/dist/chunks/dashboard.mjs +8 -8
- package/dist/chunks/delete.mjs +6 -6
- package/dist/chunks/delete2.mjs +6 -6
- package/dist/chunks/delete3.mjs +6 -6
- package/dist/chunks/delete4.mjs +6 -6
- package/dist/chunks/delete5.mjs +6 -6
- package/dist/chunks/delete6.mjs +6 -6
- package/dist/chunks/delete7.mjs +6 -6
- package/dist/chunks/delete8.mjs +6 -6
- package/dist/chunks/delete9.mjs +6 -6
- package/dist/chunks/edit.mjs +6 -6
- package/dist/chunks/edit2.mjs +6 -6
- package/dist/chunks/edit3.mjs +6 -6
- package/dist/chunks/edit4.mjs +6 -6
- package/dist/chunks/edit5.mjs +6 -6
- package/dist/chunks/edit6.mjs +6 -6
- package/dist/chunks/edit7.mjs +6 -6
- package/dist/chunks/edit8.mjs +6 -6
- package/dist/chunks/history.mjs +8 -8
- 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 +8 -8
- package/dist/chunks/list10.mjs +8 -8
- package/dist/chunks/list11.mjs +8 -8
- package/dist/chunks/list12.mjs +8 -8
- package/dist/chunks/list13.mjs +8 -8
- package/dist/chunks/list14.mjs +8 -8
- package/dist/chunks/list15.mjs +8 -8
- package/dist/chunks/list2.mjs +10 -15
- package/dist/chunks/list3.mjs +8 -8
- package/dist/chunks/list4.mjs +8 -8
- package/dist/chunks/list5.mjs +8 -8
- package/dist/chunks/list6.mjs +8 -8
- package/dist/chunks/list7.mjs +8 -8
- package/dist/chunks/list8.mjs +8 -8
- package/dist/chunks/list9.mjs +8 -8
- package/dist/chunks/login.mjs +19 -8
- package/dist/chunks/logout.mjs +4 -4
- package/dist/chunks/me.mjs +8 -8
- package/dist/chunks/read-all.mjs +6 -6
- package/dist/chunks/read.mjs +6 -6
- package/dist/chunks/read2.mjs +6 -6
- package/dist/chunks/refresh.mjs +5 -5
- package/dist/chunks/remove-user.mjs +6 -6
- package/dist/chunks/remove.mjs +6 -6
- package/dist/chunks/reopen.mjs +6 -6
- package/dist/chunks/status.mjs +5 -5
- package/dist/chunks/status2.mjs +6 -6
- package/dist/chunks/status3.mjs +6 -6
- package/dist/chunks/switch.mjs +3 -3
- package/dist/chunks/tags.mjs +6 -6
- package/dist/chunks/token.mjs +4 -4
- package/dist/chunks/tree.mjs +6 -6
- package/dist/chunks/users.mjs +8 -8
- package/dist/chunks/view.mjs +8 -8
- package/dist/chunks/view2.mjs +8 -8
- package/dist/chunks/view3.mjs +9 -9
- package/dist/chunks/view4.mjs +8 -8
- package/dist/chunks/view5.mjs +8 -8
- package/dist/chunks/view6.mjs +8 -8
- package/dist/chunks/view7.mjs +8 -8
- package/dist/chunks/view8.mjs +8 -8
- package/dist/chunks/view9.mjs +8 -8
- package/dist/index.mjs +8 -7
- package/dist/shared/{bee.Bt1TK6yh.mjs → bee.B3N0WBdU.mjs} +46 -6
- package/dist/shared/{bee.BeQSH2t0.mjs → bee.BImw1HZl.mjs} +6 -3
- package/dist/shared/{bee.D6yQ6Pqf.mjs → bee.C4p7W8_P.mjs} +1 -1
- package/dist/shared/{bee.CCNmDHVv.mjs → bee.CirccSk2.mjs} +19 -1
- package/dist/shared/{bee.Ds2l-nTJ.mjs → bee.DFnSWb6q.mjs} +101 -13
- package/dist/shared/{bee.OJ0vqxJN.mjs → bee.DessOtkV.mjs} +10 -3
- package/dist/shared/{bee.DxRKWv6n.mjs → bee.DfqnFet4.mjs} +1 -1
- package/dist/shared/{bee.bmiIlr9W.mjs → bee.KteAW2rM.mjs} +12 -2
- package/dist/shared/{bee.IM3QELRf.mjs → bee.a05kNWpn.mjs} +1 -1
- package/dist/shared/{bee.BtxMsVL4.mjs → bee.x-FvgDW2.mjs} +3230 -674
- package/package.json +8 -8
|
@@ -4,8 +4,9 @@ import 'node:stream/consumers';
|
|
|
4
4
|
import * as v from 'valibot';
|
|
5
5
|
import { Backlog } from 'backlog-js';
|
|
6
6
|
import { r as refreshAccessToken } from './bee.CktwmH8R.mjs';
|
|
7
|
-
import { l as loadConfig } from './bee.
|
|
8
|
-
import { f as findSpace, u as updateSpaceAuth } from './bee.
|
|
7
|
+
import { l as loadConfig } from './bee.B3N0WBdU.mjs';
|
|
8
|
+
import { f as findSpace, u as updateSpaceAuth } from './bee.DfqnFet4.mjs';
|
|
9
|
+
import './bee.BImw1HZl.mjs';
|
|
9
10
|
|
|
10
11
|
const formatResetTime = (epochSeconds) => {
|
|
11
12
|
const date = new Date(epochSeconds * 1e3);
|
|
@@ -14,12 +15,18 @@ const formatResetTime = (epochSeconds) => {
|
|
|
14
15
|
|
|
15
16
|
const getClient = async (host) => {
|
|
16
17
|
const config = loadConfig();
|
|
17
|
-
const
|
|
18
|
+
const envApiKey = process.env.BACKLOG_API_KEY;
|
|
19
|
+
const envSpace = process.env.BACKLOG_SPACE;
|
|
20
|
+
const resolvedHost = host ?? envSpace ?? config.defaultSpace;
|
|
18
21
|
if (!resolvedHost) {
|
|
19
22
|
throw new UserError("No space configured. Run `bee auth login` to authenticate.");
|
|
20
23
|
}
|
|
21
24
|
const resolved = findSpace(config.spaces, resolvedHost);
|
|
22
25
|
if (!resolved) {
|
|
26
|
+
if (envApiKey) {
|
|
27
|
+
const client = new Backlog({ host: resolvedHost, apiKey: envApiKey });
|
|
28
|
+
return { client, host: resolvedHost };
|
|
29
|
+
}
|
|
23
30
|
throw new UserError(
|
|
24
31
|
`Space "${resolvedHost}" not found. Run \`bee auth login\` to authenticate.`
|
|
25
32
|
);
|
|
@@ -45,7 +45,14 @@ ${lines.join("\n")}`;
|
|
|
45
45
|
}
|
|
46
46
|
_renderEnvVars() {
|
|
47
47
|
const fromOptions = this.options.filter((opt) => opt.envVar).map((opt) => [opt.envVar, opt.description ?? ""]);
|
|
48
|
-
const
|
|
48
|
+
const seen = /* @__PURE__ */ new Set();
|
|
49
|
+
const vars = [...fromOptions, ...this.beeEnvVars].filter(([name]) => {
|
|
50
|
+
if (seen.has(name)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
seen.add(name);
|
|
54
|
+
return true;
|
|
55
|
+
});
|
|
49
56
|
if (vars.length === 0) {
|
|
50
57
|
return "";
|
|
51
58
|
}
|
|
@@ -56,7 +63,10 @@ ${colorize("bold", "ENVIRONMENT VARIABLES")}
|
|
|
56
63
|
${lines.join("\n")}`;
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
|
-
const ENV_AUTH = [
|
|
66
|
+
const ENV_AUTH = [
|
|
67
|
+
["BACKLOG_API_KEY", "Authenticate with an API key"],
|
|
68
|
+
["BACKLOG_SPACE", "Space hostname"]
|
|
69
|
+
];
|
|
60
70
|
const ENV_PROJECT = ["BACKLOG_PROJECT", "Default project ID or project key"];
|
|
61
71
|
const ENV_REPO = ["BACKLOG_REPO", "Default repository name"];
|
|
62
72
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import consola from 'consola';
|
|
2
|
-
import { s as stringWidth, w as widthPadEnd, a as widthTruncate } from './bee.
|
|
2
|
+
import { s as stringWidth, w as widthPadEnd, a as widthTruncate } from './bee.DFnSWb6q.mjs';
|
|
3
3
|
|
|
4
4
|
const printTable = (rows) => {
|
|
5
5
|
if (rows.length === 0) {
|