@vostride/agent-qa-dashboard 0.1.18 → 0.1.20

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.
@@ -3685,7 +3685,20 @@ data: ${JSON.stringify(event)}
3685
3685
  }
3686
3686
  if (path === "/api/app-metadata" && req.method === "GET") {
3687
3687
  const version = (0, import_agent_qa_core5.getAgentQaVersion)().trim() || "0.0.0";
3688
- json(res, { version });
3688
+ (async () => {
3689
+ try {
3690
+ const status = await (0, import_agent_qa_core5.getAgentQaUpdateStatus)();
3691
+ const latestVersion = typeof status.latestVersion === "string" ? status.latestVersion.trim() : "";
3692
+ if (status.updateAvailable === true && latestVersion) {
3693
+ json(res, { version, update: { latestVersion } });
3694
+ return;
3695
+ }
3696
+ } catch {
3697
+ }
3698
+ json(res, { version });
3699
+ })().catch(() => {
3700
+ json(res, { version });
3701
+ });
3689
3702
  return;
3690
3703
  }
3691
3704
  if (path === "/api/config/targets" && req.method === "GET") {