feedbackbasket-cli 0.3.2 → 0.3.5
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.
|
@@ -4,9 +4,14 @@ import { AuthManager } from '../auth/manager.js';
|
|
|
4
4
|
import { loadConfig } from '../config/config.js';
|
|
5
5
|
import { errAuth } from '../output/errors.js';
|
|
6
6
|
import { brand, divider } from '../output/theme.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { resolveProject } from '../resolve.js';
|
|
8
|
+
async function resolveProjectId(client, optProject, all) {
|
|
9
|
+
if (all)
|
|
10
|
+
return undefined;
|
|
11
|
+
if (optProject) {
|
|
12
|
+
const project = await resolveProject(client, optProject);
|
|
13
|
+
return project.id;
|
|
14
|
+
}
|
|
10
15
|
const config = loadConfig();
|
|
11
16
|
return config.defaultProject;
|
|
12
17
|
}
|
|
@@ -17,6 +22,7 @@ export function createBugsCommand(getWriter) {
|
|
|
17
22
|
.command('list')
|
|
18
23
|
.description('List bug reports with severity classification')
|
|
19
24
|
.option('--project <id>', 'Filter by project ID')
|
|
25
|
+
.option('--all', 'Show bugs across all projects (ignore default project)')
|
|
20
26
|
.option('--severity <level>', 'Filter by severity (high, medium, low)')
|
|
21
27
|
.option('--status <status>', 'Filter by status')
|
|
22
28
|
.option('--search <query>', 'Search bug content')
|
|
@@ -27,7 +33,7 @@ export function createBugsCommand(getWriter) {
|
|
|
27
33
|
const writer = getWriter();
|
|
28
34
|
const client = requireClient();
|
|
29
35
|
const result = await client.getBugReports({
|
|
30
|
-
projectId: resolveProjectId(opts.project),
|
|
36
|
+
projectId: await resolveProjectId(client, opts.project, opts.all),
|
|
31
37
|
status: opts.status,
|
|
32
38
|
severity: opts.severity,
|
|
33
39
|
search: opts.search,
|
|
@@ -57,12 +63,13 @@ export function createBugsCommand(getWriter) {
|
|
|
57
63
|
});
|
|
58
64
|
bugs
|
|
59
65
|
.command('stats')
|
|
66
|
+
.option('--all', 'Show stats across all projects')
|
|
60
67
|
.description('Show bug statistics summary')
|
|
61
68
|
.option('--project <id>', 'Filter by project ID')
|
|
62
69
|
.action(async (opts) => {
|
|
63
70
|
const writer = getWriter();
|
|
64
71
|
const client = requireClient();
|
|
65
|
-
const stats = await client.getBugStats({ projectId: opts.project });
|
|
72
|
+
const stats = await client.getBugStats({ projectId: await resolveProjectId(client, opts.project, opts.all) });
|
|
66
73
|
if (!writer.isMachineOutput()) {
|
|
67
74
|
renderBugStats(stats);
|
|
68
75
|
}
|
|
@@ -110,7 +117,8 @@ function renderBugList(bugs) {
|
|
|
110
117
|
const sev = severityColor[bug.severity](`[${bug.severity.toUpperCase()}]`);
|
|
111
118
|
const status = brand.muted(`[${bug.status}]`);
|
|
112
119
|
const content = bug.content.length > 75 ? bug.content.slice(0, 72) + '...' : bug.content;
|
|
113
|
-
|
|
120
|
+
const proj = bug.project ? brand.primary(bug.project.name) : '';
|
|
121
|
+
console.log(`${sev} ${status} ${proj} ${brand.muted(bug.id)}`);
|
|
114
122
|
console.log(` ${content}`);
|
|
115
123
|
if (bug.aiSummary) {
|
|
116
124
|
console.log(` ${brand.hint(bug.aiSummary)}`);
|
|
@@ -4,9 +4,14 @@ import { AuthManager } from '../auth/manager.js';
|
|
|
4
4
|
import { loadConfig } from '../config/config.js';
|
|
5
5
|
import { errAuth } from '../output/errors.js';
|
|
6
6
|
import { brand } from '../output/theme.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { resolveProject } from '../resolve.js';
|
|
8
|
+
async function resolveProjectId(client, optProject, all) {
|
|
9
|
+
if (all)
|
|
10
|
+
return undefined;
|
|
11
|
+
if (optProject) {
|
|
12
|
+
const project = await resolveProject(client, optProject);
|
|
13
|
+
return project.id;
|
|
14
|
+
}
|
|
10
15
|
const config = loadConfig();
|
|
11
16
|
return config.defaultProject;
|
|
12
17
|
}
|
|
@@ -29,6 +34,7 @@ export function createFeedbackCommand(getWriter) {
|
|
|
29
34
|
.command('list')
|
|
30
35
|
.description('List feedback with optional filters')
|
|
31
36
|
.option('--project <id>', 'Filter by project ID')
|
|
37
|
+
.option('--all', 'Show feedback across all projects (ignore default project)')
|
|
32
38
|
.option('--category <category>', 'Filter by category (BUG, FEATURE_REQUEST, IMPROVEMENT, QUESTION)')
|
|
33
39
|
.option('--status <status>', 'Filter by status (OPEN, UNDER_REVIEW, PLANNED, IN_PROGRESS, COMPLETE, CLOSED)')
|
|
34
40
|
.option('--sentiment <sentiment>', 'Filter by sentiment (POSITIVE, NEGATIVE, NEUTRAL)')
|
|
@@ -40,7 +46,7 @@ export function createFeedbackCommand(getWriter) {
|
|
|
40
46
|
const writer = getWriter();
|
|
41
47
|
const client = requireClient();
|
|
42
48
|
const result = await client.getFeedback({
|
|
43
|
-
projectId: resolveProjectId(opts.project),
|
|
49
|
+
projectId: await resolveProjectId(client, opts.project, opts.all),
|
|
44
50
|
category: opts.category,
|
|
45
51
|
status: opts.status,
|
|
46
52
|
sentiment: opts.sentiment,
|
|
@@ -98,7 +104,7 @@ export function createFeedbackCommand(getWriter) {
|
|
|
98
104
|
const writer = getWriter();
|
|
99
105
|
const client = requireClient();
|
|
100
106
|
const result = await client.searchFeedback(query, {
|
|
101
|
-
projectId: resolveProjectId(opts.project),
|
|
107
|
+
projectId: await resolveProjectId(client, opts.project),
|
|
102
108
|
category: opts.category,
|
|
103
109
|
limit: parseInt(opts.limit, 10),
|
|
104
110
|
});
|
|
@@ -146,7 +152,8 @@ function renderFeedbackList(items) {
|
|
|
146
152
|
const priority = priorityLabel(item.aiPriorityScore);
|
|
147
153
|
const content = item.content.length > 80 ? item.content.slice(0, 77) + '...' : item.content;
|
|
148
154
|
const status = brand.muted(`[${item.status}]`);
|
|
149
|
-
|
|
155
|
+
const proj = item.project ? brand.primary(item.project.name) : '';
|
|
156
|
+
console.log(`${cat} ${priority} ${status} ${proj} ${brand.muted(item.id)}`);
|
|
150
157
|
console.log(` ${content}`);
|
|
151
158
|
if (item.aiSummary) {
|
|
152
159
|
console.log(` ${brand.hint(item.aiSummary)}`);
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
2
|
-
export declare const USER_AGENT = "FeedbackBasket-CLI/0.3.
|
|
1
|
+
export declare const VERSION = "0.3.5";
|
|
2
|
+
export declare const USER_AGENT = "FeedbackBasket-CLI/0.3.5";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.5';
|
|
2
2
|
export const USER_AGENT = `FeedbackBasket-CLI/${VERSION}`;
|