@bbearai/core 0.5.1 → 0.5.2
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/index.js +3 -4
- package/dist/index.mjs +3 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -661,8 +661,8 @@ var BugBearClient = class {
|
|
|
661
661
|
return { success: false, error: rateLimit.error };
|
|
662
662
|
}
|
|
663
663
|
if (!userInfo) {
|
|
664
|
-
console.error("BugBear: No user info available, cannot submit report");
|
|
665
|
-
return { success: false, error: "
|
|
664
|
+
console.error("BugBear: No user info available, cannot submit report. Ensure your BugBear config provides a getCurrentUser() callback that returns { id, email }.");
|
|
665
|
+
return { success: false, error: "Unable to identify user. Check that your app passes a getCurrentUser callback to BugBear config." };
|
|
666
666
|
}
|
|
667
667
|
const testerInfo = await this.getTesterInfo();
|
|
668
668
|
fullReport = {
|
|
@@ -768,10 +768,9 @@ var BugBearClient = class {
|
|
|
768
768
|
platforms
|
|
769
769
|
)
|
|
770
770
|
`;
|
|
771
|
-
const twentyFourHoursAgo = new Date(Date.now() - 24 * 60 * 60 * 1e3).toISOString();
|
|
772
771
|
const [pendingResult, completedResult] = await Promise.all([
|
|
773
772
|
this.supabase.from("test_assignments").select(selectFields).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["pending", "in_progress"]).order("created_at", { ascending: true }).range(from, to),
|
|
774
|
-
this.supabase.from("test_assignments").select(selectFields).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["passed", "failed", "skipped", "blocked"]).
|
|
773
|
+
this.supabase.from("test_assignments").select(selectFields).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["passed", "failed", "skipped", "blocked"]).order("completed_at", { ascending: false }).limit(100)
|
|
775
774
|
]);
|
|
776
775
|
if (pendingResult.error) {
|
|
777
776
|
console.error("BugBear: Failed to fetch assignments", formatPgError(pendingResult.error));
|
package/dist/index.mjs
CHANGED
|
@@ -627,8 +627,8 @@ var BugBearClient = class {
|
|
|
627
627
|
return { success: false, error: rateLimit.error };
|
|
628
628
|
}
|
|
629
629
|
if (!userInfo) {
|
|
630
|
-
console.error("BugBear: No user info available, cannot submit report");
|
|
631
|
-
return { success: false, error: "
|
|
630
|
+
console.error("BugBear: No user info available, cannot submit report. Ensure your BugBear config provides a getCurrentUser() callback that returns { id, email }.");
|
|
631
|
+
return { success: false, error: "Unable to identify user. Check that your app passes a getCurrentUser callback to BugBear config." };
|
|
632
632
|
}
|
|
633
633
|
const testerInfo = await this.getTesterInfo();
|
|
634
634
|
fullReport = {
|
|
@@ -734,10 +734,9 @@ var BugBearClient = class {
|
|
|
734
734
|
platforms
|
|
735
735
|
)
|
|
736
736
|
`;
|
|
737
|
-
const twentyFourHoursAgo = new Date(Date.now() - 24 * 60 * 60 * 1e3).toISOString();
|
|
738
737
|
const [pendingResult, completedResult] = await Promise.all([
|
|
739
738
|
this.supabase.from("test_assignments").select(selectFields).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["pending", "in_progress"]).order("created_at", { ascending: true }).range(from, to),
|
|
740
|
-
this.supabase.from("test_assignments").select(selectFields).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["passed", "failed", "skipped", "blocked"]).
|
|
739
|
+
this.supabase.from("test_assignments").select(selectFields).eq("project_id", this.config.projectId).eq("tester_id", testerInfo.id).in("status", ["passed", "failed", "skipped", "blocked"]).order("completed_at", { ascending: false }).limit(100)
|
|
741
740
|
]);
|
|
742
741
|
if (pendingResult.error) {
|
|
743
742
|
console.error("BugBear: Failed to fetch assignments", formatPgError(pendingResult.error));
|