quick-bug-reporter-react 1.1.1 → 1.2.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 +129 -23
- package/dist/index.cjs +42 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +42 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1150,22 +1150,30 @@ var LinearIntegration = class {
|
|
|
1150
1150
|
const formData = new FormData();
|
|
1151
1151
|
formData.set("provider", "linear");
|
|
1152
1152
|
formData.set("title", payload.title);
|
|
1153
|
-
formData.set("description", payload
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
const formattedLogs = formatNetworkLogs(payload.networkLogs);
|
|
1160
|
-
formData.set("networkLogs", formattedLogs);
|
|
1161
|
-
formData.append("requestsLogFile", new Blob([formattedLogs], { type: "text/plain" }), "network-logs.txt");
|
|
1162
|
-
if (payload.videoBlob) {
|
|
1163
|
-
const file = toBlobFile(payload.videoBlob, "bug-recording.webm", "video/webm");
|
|
1164
|
-
formData.append("screenRecordingFile", file, file.name);
|
|
1153
|
+
formData.set("description", buildCleanDescription(payload, { screenshotUrl: null, recordingUrl: null }));
|
|
1154
|
+
if (this.teamId) {
|
|
1155
|
+
formData.set("teamId", this.teamId);
|
|
1156
|
+
}
|
|
1157
|
+
if (this.projectId) {
|
|
1158
|
+
formData.set("projectId", this.projectId);
|
|
1165
1159
|
}
|
|
1166
1160
|
if (payload.screenshotBlob) {
|
|
1167
|
-
|
|
1168
|
-
|
|
1161
|
+
formData.append("screenshotFile", toBlobFile(payload.screenshotBlob, "bug-screenshot.png", "image/png"), "bug-screenshot.png");
|
|
1162
|
+
}
|
|
1163
|
+
if (payload.videoBlob) {
|
|
1164
|
+
formData.append("screenRecordingFile", toBlobFile(payload.videoBlob, "bug-recording.webm", "video/webm"), "bug-recording.webm");
|
|
1165
|
+
}
|
|
1166
|
+
formData.append("networkLogsFile", new Blob([formatNetworkLogs(payload.networkLogs)], { type: "text/plain" }), "network-logs.txt");
|
|
1167
|
+
formData.append("clientMetadataFile", new Blob([JSON.stringify(payload.metadata, null, 2)], { type: "application/json" }), "client-metadata.json");
|
|
1168
|
+
if (payload.consoleLogs.length > 0 || payload.jsErrors.length > 0) {
|
|
1169
|
+
const consoleParts = [];
|
|
1170
|
+
if (payload.jsErrors.length > 0) {
|
|
1171
|
+
consoleParts.push("=== JavaScript Errors ===\n" + formatJsErrors(payload.jsErrors));
|
|
1172
|
+
}
|
|
1173
|
+
if (payload.consoleLogs.length > 0) {
|
|
1174
|
+
consoleParts.push("=== Console Output ===\n" + formatConsoleLogs(payload.consoleLogs));
|
|
1175
|
+
}
|
|
1176
|
+
formData.append("consoleLogsFile", new Blob([consoleParts.join("\n\n")], { type: "text/plain" }), "console-logs.txt");
|
|
1169
1177
|
}
|
|
1170
1178
|
(onProgress ?? noop)("Submitting to Linear\u2026");
|
|
1171
1179
|
const response = await this.fetchImpl(this.submitProxyEndpoint, {
|
|
@@ -1496,22 +1504,28 @@ var JiraIntegration = class {
|
|
|
1496
1504
|
const formData = new FormData();
|
|
1497
1505
|
formData.set("provider", "jira");
|
|
1498
1506
|
formData.set("title", payload.title);
|
|
1499
|
-
formData.set("description", payload
|
|
1500
|
-
formData.set("
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
formData.set("captureMode", payload.captureMode);
|
|
1504
|
-
formData.set("clientMetadata", JSON.stringify(payload.metadata));
|
|
1505
|
-
const formattedLogs = formatNetworkLogs(payload.networkLogs);
|
|
1506
|
-
formData.append("requestsLogFile", new Blob([formattedLogs], { type: "text/plain" }), "network-logs.txt");
|
|
1507
|
-
formData.append("clientMetadataFile", new Blob([JSON.stringify(payload.metadata, null, 2)], { type: "application/json" }), "client-metadata.json");
|
|
1508
|
-
if (payload.videoBlob) {
|
|
1509
|
-
const file = toBlobFile(payload.videoBlob, "bug-recording.webm", "video/webm");
|
|
1510
|
-
formData.append("screenRecordingFile", file, file.name);
|
|
1507
|
+
formData.set("description", buildCleanDescription2(payload));
|
|
1508
|
+
formData.set("issueType", this.issueType);
|
|
1509
|
+
if (this.projectKey) {
|
|
1510
|
+
formData.set("projectKey", this.projectKey);
|
|
1511
1511
|
}
|
|
1512
1512
|
if (payload.screenshotBlob) {
|
|
1513
|
-
|
|
1514
|
-
|
|
1513
|
+
formData.append("screenshotFile", toBlobFile(payload.screenshotBlob, "bug-screenshot.png", "image/png"), "bug-screenshot.png");
|
|
1514
|
+
}
|
|
1515
|
+
if (payload.videoBlob) {
|
|
1516
|
+
formData.append("screenRecordingFile", toBlobFile(payload.videoBlob, "bug-recording.webm", "video/webm"), "bug-recording.webm");
|
|
1517
|
+
}
|
|
1518
|
+
formData.append("networkLogsFile", new Blob([formatNetworkLogs(payload.networkLogs)], { type: "text/plain" }), "network-logs.txt");
|
|
1519
|
+
formData.append("clientMetadataFile", new Blob([JSON.stringify(payload.metadata, null, 2)], { type: "application/json" }), "client-metadata.json");
|
|
1520
|
+
if (payload.consoleLogs.length > 0 || payload.jsErrors.length > 0) {
|
|
1521
|
+
const consoleParts = [];
|
|
1522
|
+
if (payload.jsErrors.length > 0) {
|
|
1523
|
+
consoleParts.push("=== JavaScript Errors ===\n" + formatJsErrors(payload.jsErrors));
|
|
1524
|
+
}
|
|
1525
|
+
if (payload.consoleLogs.length > 0) {
|
|
1526
|
+
consoleParts.push("=== Console Output ===\n" + formatConsoleLogs(payload.consoleLogs));
|
|
1527
|
+
}
|
|
1528
|
+
formData.append("consoleLogsFile", new Blob([consoleParts.join("\n\n")], { type: "text/plain" }), "console-logs.txt");
|
|
1515
1529
|
}
|
|
1516
1530
|
(onProgress ?? noop2)("Submitting to Jira\u2026");
|
|
1517
1531
|
const response = await this.fetchImpl(this.submitProxyEndpoint, {
|