@nulab/bee 1.1.0 → 1.1.1
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/README.md +6 -3
- package/dist/chunks/activities.mjs +9 -11
- package/dist/chunks/activities2.mjs +9 -11
- package/dist/chunks/activities3.mjs +9 -11
- package/dist/chunks/add-user.mjs +8 -10
- package/dist/chunks/add.mjs +8 -10
- package/dist/chunks/add2.mjs +8 -10
- package/dist/chunks/api.mjs +8 -10
- package/dist/chunks/attachments.mjs +9 -11
- package/dist/chunks/attachments2.mjs +9 -11
- package/dist/chunks/attachments3.mjs +9 -11
- package/dist/chunks/browse.mjs +5 -7
- package/dist/chunks/clone.mjs +8 -10
- package/dist/chunks/close.mjs +8 -10
- package/dist/chunks/comment.mjs +6 -8
- package/dist/chunks/comment2.mjs +9 -11
- package/dist/chunks/comments.mjs +8 -10
- package/dist/chunks/completion.mjs +51 -56
- package/dist/chunks/count.mjs +9 -11
- package/dist/chunks/count2.mjs +8 -10
- package/dist/chunks/count3.mjs +9 -11
- package/dist/chunks/count4.mjs +8 -10
- package/dist/chunks/count5.mjs +8 -10
- package/dist/chunks/create.mjs +5 -7
- package/dist/chunks/create2.mjs +7 -9
- package/dist/chunks/create3.mjs +6 -8
- package/dist/chunks/create4.mjs +6 -8
- package/dist/chunks/create5.mjs +6 -8
- package/dist/chunks/create6.mjs +5 -7
- package/dist/chunks/create7.mjs +5 -7
- package/dist/chunks/create8.mjs +5 -7
- package/dist/chunks/create9.mjs +5 -7
- package/dist/chunks/dashboard.mjs +9 -11
- package/dist/chunks/delete.mjs +5 -7
- package/dist/chunks/delete2.mjs +5 -7
- package/dist/chunks/delete3.mjs +5 -7
- package/dist/chunks/delete4.mjs +5 -7
- package/dist/chunks/delete5.mjs +5 -7
- package/dist/chunks/delete6.mjs +5 -7
- package/dist/chunks/delete7.mjs +5 -7
- package/dist/chunks/delete8.mjs +5 -7
- package/dist/chunks/delete9.mjs +5 -7
- package/dist/chunks/edit.mjs +8 -10
- package/dist/chunks/edit2.mjs +9 -11
- package/dist/chunks/edit3.mjs +9 -11
- package/dist/chunks/edit4.mjs +8 -10
- package/dist/chunks/edit5.mjs +5 -7
- package/dist/chunks/edit6.mjs +8 -10
- package/dist/chunks/edit7.mjs +8 -10
- package/dist/chunks/edit8.mjs +8 -10
- package/dist/chunks/history.mjs +9 -11
- package/dist/chunks/list.mjs +9 -11
- package/dist/chunks/list10.mjs +9 -11
- package/dist/chunks/list11.mjs +9 -11
- package/dist/chunks/list12.mjs +9 -11
- package/dist/chunks/list13.mjs +9 -11
- package/dist/chunks/list14.mjs +9 -11
- package/dist/chunks/list15.mjs +9 -11
- package/dist/chunks/list2.mjs +10 -12
- package/dist/chunks/list3.mjs +10 -12
- package/dist/chunks/list4.mjs +9 -11
- package/dist/chunks/list5.mjs +10 -12
- package/dist/chunks/list6.mjs +9 -11
- package/dist/chunks/list7.mjs +9 -11
- package/dist/chunks/list8.mjs +9 -11
- package/dist/chunks/list9.mjs +9 -11
- package/dist/chunks/login.mjs +2 -4
- package/dist/chunks/logout.mjs +8 -4
- package/dist/chunks/me.mjs +9 -11
- package/dist/chunks/read-all.mjs +8 -10
- package/dist/chunks/read.mjs +8 -10
- package/dist/chunks/read2.mjs +8 -10
- package/dist/chunks/refresh.mjs +4 -6
- package/dist/chunks/remove-user.mjs +8 -10
- package/dist/chunks/remove.mjs +8 -10
- package/dist/chunks/reopen.mjs +8 -10
- package/dist/chunks/status.mjs +7 -4
- package/dist/chunks/status2.mjs +8 -10
- package/dist/chunks/status3.mjs +8 -10
- package/dist/chunks/switch.mjs +7 -3
- package/dist/chunks/tags.mjs +8 -10
- package/dist/chunks/token.mjs +8 -4
- package/dist/chunks/tree.mjs +8 -10
- package/dist/chunks/users.mjs +9 -11
- package/dist/chunks/view.mjs +9 -11
- package/dist/chunks/view2.mjs +12 -13
- package/dist/chunks/view3.mjs +9 -11
- package/dist/chunks/view4.mjs +9 -11
- package/dist/chunks/view5.mjs +9 -11
- package/dist/chunks/view6.mjs +9 -11
- package/dist/chunks/view7.mjs +9 -11
- package/dist/chunks/view8.mjs +9 -11
- package/dist/chunks/view9.mjs +9 -11
- package/dist/index.mjs +37746 -33
- package/dist/shared/{bee.PF8hrVKn.mjs → bee.084B_7FC.mjs} +1 -1
- package/dist/shared/{bee.DfqnFet4.mjs → bee.CAARNIp6.mjs} +1 -1
- package/dist/shared/{bee.B3N0WBdU.mjs → bee.CHtg3F43.mjs} +1 -2
- package/dist/shared/{bee.DessOtkV.mjs → bee.RsR9yniy.mjs} +3 -4
- package/dist/shared/{bee.G4d7izLe.mjs → bee.q93n012-.mjs} +1 -1
- package/package.json +5 -3
- package/dist/shared/bee.BImw1HZl.mjs +0 -28
- package/dist/shared/bee.BYqxm3yG.mjs +0 -24
- package/dist/shared/bee.x-FvgDW2.mjs +0 -37660
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'consola';
|
|
2
2
|
import 'node:stream/consumers';
|
|
3
3
|
import * as v from 'valibot';
|
|
4
|
-
import { v as vInteger } from '
|
|
4
|
+
import { v as vInteger } from '../index.mjs';
|
|
5
5
|
|
|
6
6
|
const resolveProjectIds = async (client, values) => {
|
|
7
7
|
if (values.length === 0) {
|
|
@@ -2,10 +2,9 @@ import { existsSync, readFileSync, writeFileSync, chmodSync } from 'node:fs';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import consola from 'consola';
|
|
5
|
-
import { U as UserError, p as parseArg, v as vInteger } from '
|
|
5
|
+
import { U as UserError, b as RcSchema, p as parseArg, v as vInteger } from '../index.mjs';
|
|
6
6
|
import 'node:stream/consumers';
|
|
7
7
|
import * as v from 'valibot';
|
|
8
|
-
import { a as RcSchema } from './bee.BImw1HZl.mjs';
|
|
9
8
|
import { Option } from 'commander';
|
|
10
9
|
|
|
11
10
|
const promptRequired = async (label, existing, options) => {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import consola from 'consola';
|
|
2
|
-
import { U as UserError, a as vFiniteNumber } from '
|
|
2
|
+
import { U as UserError, a as vFiniteNumber } from '../index.mjs';
|
|
3
3
|
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.
|
|
9
|
-
import './bee.BImw1HZl.mjs';
|
|
7
|
+
import { l as loadConfig } from './bee.CHtg3F43.mjs';
|
|
8
|
+
import { f as findSpace, u as updateSpaceAuth } from './bee.CAARNIp6.mjs';
|
|
10
9
|
|
|
11
10
|
const formatResetTime = (epochSeconds) => {
|
|
12
11
|
const date = new Date(epochSeconds * 1e3);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'consola';
|
|
2
2
|
import 'node:stream/consumers';
|
|
3
3
|
import 'valibot';
|
|
4
|
-
import { p as parseArg, v as vInteger } from '
|
|
4
|
+
import { p as parseArg, v as vInteger } from '../index.mjs';
|
|
5
5
|
|
|
6
6
|
const resolveUserId = async (client, value) => {
|
|
7
7
|
if (value === "@me") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulab/bee",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Bring Backlog to your command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backlog",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"unbuild": "^3.6.1",
|
|
44
44
|
"vitest": "^4.1.11",
|
|
45
45
|
"@repo/backlog-utils": "0.0.0",
|
|
46
|
-
"@repo/cli-utils": "0.0.0",
|
|
47
46
|
"@repo/config": "0.0.0",
|
|
47
|
+
"@repo/tsconfigs": "0.0.0",
|
|
48
48
|
"@repo/test-utils": "0.0.0",
|
|
49
|
-
"@repo/
|
|
49
|
+
"@repo/cli-utils": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=20.18"
|
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "unbuild",
|
|
56
56
|
"dev": "tsx --env-file=.env.development src/index.ts",
|
|
57
|
+
"generate:skill": "tsx src/scripts/generate-skill.ts",
|
|
58
|
+
"generate:skill:check": "tsx src/scripts/generate-skill.ts --check",
|
|
57
59
|
"test": "vitest run",
|
|
58
60
|
"typecheck": "tsc --noEmit"
|
|
59
61
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
|
|
3
|
-
const ApiKeyAuthSchema = v.object({
|
|
4
|
-
method: v.literal("api-key"),
|
|
5
|
-
apiKey: v.string()
|
|
6
|
-
});
|
|
7
|
-
const OAuthAuthSchema = v.object({
|
|
8
|
-
method: v.literal("oauth"),
|
|
9
|
-
accessToken: v.string(),
|
|
10
|
-
refreshToken: v.string(),
|
|
11
|
-
clientId: v.optional(v.string()),
|
|
12
|
-
clientSecret: v.optional(v.string())
|
|
13
|
-
});
|
|
14
|
-
const RcAuthSchema = v.variant("method", [ApiKeyAuthSchema, OAuthAuthSchema]);
|
|
15
|
-
const RcHostSchema = v.pipe(v.string(), v.toLowerCase(), v.domain());
|
|
16
|
-
const RcSpaceSchema = v.object({
|
|
17
|
-
host: RcHostSchema,
|
|
18
|
-
auth: RcAuthSchema
|
|
19
|
-
});
|
|
20
|
-
const RcSchema = v.object({
|
|
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())),
|
|
24
|
-
spaces: v.optional(v.array(RcSpaceSchema), []),
|
|
25
|
-
aliases: v.optional(v.record(v.string(), v.string()), {})
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export { RcHostSchema as R, RcSchema as a };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
import consola from 'consola';
|
|
3
|
-
|
|
4
|
-
class UserError extends Error {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = "UserError";
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const vFiniteNumber = v.pipe(v.string(), v.transform(Number), v.number(), v.finite());
|
|
12
|
-
const vInteger = v.pipe(v.string(), v.transform(Number), v.number(), v.integer());
|
|
13
|
-
const parseArg = (schema, value, label) => {
|
|
14
|
-
const result = v.safeParse(schema, value);
|
|
15
|
-
if (result.success) {
|
|
16
|
-
return result.output;
|
|
17
|
-
}
|
|
18
|
-
const reason = result.issues[0]?.message;
|
|
19
|
-
const message = reason ? `Invalid value for "${label}": "${value}" \u2014 ${reason}` : `Invalid value for "${label}": "${value}"`;
|
|
20
|
-
consola.debug("parseArg validation issues:", result.issues);
|
|
21
|
-
throw new UserError(message);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { UserError as U, vFiniteNumber as a, parseArg as p, vInteger as v };
|