feedbackbasket-cli 0.6.1 → 0.7.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/README.md
CHANGED
|
@@ -123,6 +123,7 @@ feedbackbasket widget settings myapp --position bottom-left --display modal
|
|
|
123
123
|
feedbackbasket widget settings myapp --email-required --intro "How can we improve?"
|
|
124
124
|
feedbackbasket widget settings myapp --button-radius 10 --button-size regular
|
|
125
125
|
feedbackbasket widget settings myapp --show-email --allow-attachments --guided
|
|
126
|
+
feedbackbasket widget settings myapp --email-read-only --hide-email-when-prefilled
|
|
126
127
|
|
|
127
128
|
# Configure guided feedback types and follow-up questions
|
|
128
129
|
feedbackbasket widget flow myapp
|
|
@@ -134,6 +135,8 @@ feedbackbasket widget flow myapp --config ./feedback-flow.json
|
|
|
134
135
|
feedbackbasket widget script myapp
|
|
135
136
|
```
|
|
136
137
|
|
|
138
|
+
Use `--email-read-only` and `--hide-email-when-prefilled` with runtime `userEmail` values from your app. These settings do not store visitor emails in FeedbackBasket widget settings.
|
|
139
|
+
|
|
137
140
|
`widget flow --config` accepts either a `feedbackFlow` object or a JSON object with a `feedbackFlow` key. V1 supports guided mode with `text`, `textarea`, and `single_choice` follow-up questions.
|
|
138
141
|
|
|
139
142
|
```json
|
|
@@ -213,6 +213,11 @@ function renderFeedbackDetail(item) {
|
|
|
213
213
|
console.log(` ${attachment.url}`);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
+
if (item.metadata && Object.keys(item.metadata).length > 0) {
|
|
217
|
+
console.log();
|
|
218
|
+
console.log(brand.bold('Metadata:'));
|
|
219
|
+
console.log(indentBlock(JSON.stringify(item.metadata, null, 2), ' '));
|
|
220
|
+
}
|
|
216
221
|
if (item.aiSummary) {
|
|
217
222
|
console.log();
|
|
218
223
|
console.log(brand.bold('AI Summary:'));
|
|
@@ -240,6 +245,12 @@ function formatFeedbackType(item) {
|
|
|
240
245
|
return undefined;
|
|
241
246
|
return item.feedbackType.emoji ? `${item.feedbackType.emoji} ${label}` : label;
|
|
242
247
|
}
|
|
248
|
+
function indentBlock(value, indent) {
|
|
249
|
+
return value
|
|
250
|
+
.split('\n')
|
|
251
|
+
.map((line) => `${indent}${line}`)
|
|
252
|
+
.join('\n');
|
|
253
|
+
}
|
|
243
254
|
function formatBytes(bytes) {
|
|
244
255
|
if (!Number.isFinite(bytes) || bytes < 0)
|
|
245
256
|
return '';
|
|
@@ -65,6 +65,10 @@ export function createWidgetCommand(getWriter) {
|
|
|
65
65
|
.option('--no-email-required', 'Make email optional')
|
|
66
66
|
.option('--show-email', 'Show the email field')
|
|
67
67
|
.option('--no-show-email', 'Hide the email field')
|
|
68
|
+
.option('--email-read-only', 'Lock the email field when userEmail is prefilled')
|
|
69
|
+
.option('--no-email-read-only', 'Allow editing prefilled email')
|
|
70
|
+
.option('--hide-email-when-prefilled', 'Hide the email field when userEmail is prefilled')
|
|
71
|
+
.option('--no-hide-email-when-prefilled', 'Show the email field even when userEmail is prefilled')
|
|
68
72
|
.option('--allow-attachments', 'Allow image attachments')
|
|
69
73
|
.option('--no-allow-attachments', 'Disable image attachments')
|
|
70
74
|
.option('--icon-only', 'Show only the icon, no label')
|
|
@@ -84,6 +88,7 @@ export function createWidgetCommand(getWriter) {
|
|
|
84
88
|
opts.success || opts.trigger || opts.display ||
|
|
85
89
|
opts.buttonRadius || opts.buttonSize || opts.icon ||
|
|
86
90
|
opts.emailRequired !== undefined || opts.showEmail !== undefined ||
|
|
91
|
+
opts.emailReadOnly !== undefined || opts.hideEmailWhenPrefilled !== undefined ||
|
|
87
92
|
opts.allowAttachments !== undefined || opts.iconOnly !== undefined ||
|
|
88
93
|
opts.showIcon !== undefined || opts.showBranding !== undefined ||
|
|
89
94
|
opts.zIndex || opts.guided || opts.disableGuided;
|
|
@@ -117,6 +122,10 @@ export function createWidgetCommand(getWriter) {
|
|
|
117
122
|
settings.emailRequired = opts.emailRequired;
|
|
118
123
|
if (opts.showEmail !== undefined)
|
|
119
124
|
settings.showEmailField = opts.showEmail;
|
|
125
|
+
if (opts.emailReadOnly !== undefined)
|
|
126
|
+
settings.emailReadOnly = opts.emailReadOnly;
|
|
127
|
+
if (opts.hideEmailWhenPrefilled !== undefined)
|
|
128
|
+
settings.hideEmailFieldWhenPrefilled = opts.hideEmailWhenPrefilled;
|
|
120
129
|
if (opts.allowAttachments !== undefined)
|
|
121
130
|
settings.allowAttachments = opts.allowAttachments;
|
|
122
131
|
if (opts.iconOnly !== undefined)
|
|
@@ -349,6 +358,8 @@ function renderWidgetSettings(projectName, settings) {
|
|
|
349
358
|
['Display Mode', String(settings.displayMode ?? '')],
|
|
350
359
|
['Show Email', String(settings.showEmailField ?? true)],
|
|
351
360
|
['Email Required', String(settings.emailRequired ?? false)],
|
|
361
|
+
['Email Read Only', String(settings.emailReadOnly ?? false)],
|
|
362
|
+
['Hide Prefilled Email', String(settings.hideEmailFieldWhenPrefilled ?? false)],
|
|
352
363
|
['Attachments', String(settings.allowAttachments ?? true)],
|
|
353
364
|
['Guided Flow', String(settings.feedbackFlow?.enabled ?? false)],
|
|
354
365
|
['Intro Message', String(settings.introMessage ?? '')],
|
package/dist/src/types.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export interface WidgetSettings {
|
|
|
37
37
|
position?: string;
|
|
38
38
|
showEmailField?: boolean;
|
|
39
39
|
emailRequired?: boolean;
|
|
40
|
+
emailReadOnly?: boolean;
|
|
41
|
+
hideEmailFieldWhenPrefilled?: boolean;
|
|
40
42
|
allowAttachments?: boolean;
|
|
41
43
|
displayMode?: 'modal' | 'popup';
|
|
42
44
|
zIndex?: number;
|
|
@@ -76,6 +78,7 @@ export interface Feedback {
|
|
|
76
78
|
type: FeedbackFlowQuestionType;
|
|
77
79
|
value: string;
|
|
78
80
|
}> | null;
|
|
81
|
+
metadata?: Record<string, unknown> | null;
|
|
79
82
|
pageUrl?: string | null;
|
|
80
83
|
browser?: string | null;
|
|
81
84
|
os?: string | null;
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
2
|
-
export declare const USER_AGENT = "FeedbackBasket-CLI/0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
|
+
export declare const USER_AGENT = "FeedbackBasket-CLI/0.7.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.7.0';
|
|
2
2
|
export const USER_AGENT = `FeedbackBasket-CLI/${VERSION}`;
|
package/package.json
CHANGED
|
@@ -97,6 +97,7 @@ feedbackbasket widget settings <project> --color "#22c55e" --label "Send Feedbac
|
|
|
97
97
|
feedbackbasket widget settings <project> --position bottom-left --display modal
|
|
98
98
|
feedbackbasket widget settings <project> --email-required --intro "How can we improve?"
|
|
99
99
|
feedbackbasket widget settings <project> --show-email --allow-attachments --guided
|
|
100
|
+
feedbackbasket widget settings <project> --email-read-only --hide-email-when-prefilled
|
|
100
101
|
|
|
101
102
|
# Guided feedback types and follow-up questions
|
|
102
103
|
feedbackbasket widget flow <project>
|
|
@@ -105,6 +106,8 @@ feedbackbasket widget flow <project> --reset-default --enable
|
|
|
105
106
|
feedbackbasket widget flow <project> --config ./feedback-flow.json
|
|
106
107
|
```
|
|
107
108
|
|
|
109
|
+
`email-read-only` and `hide-email-when-prefilled` control behavior only when the host app passes a runtime `userEmail` value. Do not store visitor emails in widget settings.
|
|
110
|
+
|
|
108
111
|
`widget flow --config` accepts either a `feedbackFlow` object or a JSON object with a `feedbackFlow` key. Use it when an agent needs to customize visitor choices such as Bug report, Feature request, and General feedback. Supported v1 question types are `text`, `textarea`, and `single_choice`.
|
|
109
112
|
|
|
110
113
|
### Team
|
|
@@ -144,7 +147,7 @@ feedbackbasket feedback note <id> "Reviewing — appears related to auth flow" -
|
|
|
144
147
|
```bash
|
|
145
148
|
feedbackbasket bugs list --severity high --agent
|
|
146
149
|
feedbackbasket feedback show <id> --agent
|
|
147
|
-
# Response includes browser, OS, page URL, submitted feedback type, follow-up answers, attachment URLs, AI analysis, priority score
|
|
150
|
+
# Response includes browser, OS, page URL, submitted feedback type, follow-up answers, attachment URLs, metadata, AI analysis, priority score
|
|
148
151
|
```
|
|
149
152
|
|
|
150
153
|
### Close the loop — reply to the submitter
|