@vostride/agent-qa-dashboard 0.1.18 → 0.1.19

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.cjs CHANGED
@@ -6339,7 +6339,20 @@ data: ${JSON.stringify(event)}
6339
6339
  }
6340
6340
  if (path === "/api/app-metadata" && req.method === "GET") {
6341
6341
  const version = (0, import_agent_qa_core9.getAgentQaVersion)().trim() || "0.0.0";
6342
- json(res, { version });
6342
+ (async () => {
6343
+ try {
6344
+ const status = await (0, import_agent_qa_core9.getAgentQaUpdateStatus)();
6345
+ const latestVersion = typeof status.latestVersion === "string" ? status.latestVersion.trim() : "";
6346
+ if (status.updateAvailable === true && latestVersion) {
6347
+ json(res, { version, update: { latestVersion } });
6348
+ return;
6349
+ }
6350
+ } catch {
6351
+ }
6352
+ json(res, { version });
6353
+ })().catch(() => {
6354
+ json(res, { version });
6355
+ });
6343
6356
  return;
6344
6357
  }
6345
6358
  if (path === "/api/config/targets" && req.method === "GET") {