@threadbase-sh/streamer 1.52.6 → 1.53.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/dist/index.cjs CHANGED
@@ -14045,9 +14045,15 @@ function getSortValue(s, key) {
14045
14045
  case "projectName":
14046
14046
  return s.projectName;
14047
14047
  case "status":
14048
- return s.status;
14048
+ return statusSortValue(s);
14049
14049
  }
14050
14050
  }
14051
+ function statusSortValue(s) {
14052
+ const rank = s.status === "idle" ? 1 : 0;
14053
+ const activeAt = Date.parse(s.lastActivityAt ?? s.startedAt);
14054
+ const recency = String(1e15 - (Number.isNaN(activeAt) ? 0 : activeAt)).padStart(16, "0");
14055
+ return `${rank}:${recency}`;
14056
+ }
14051
14057
  function compareValues(a, b) {
14052
14058
  if (a === void 0 && b === void 0) return 0;
14053
14059
  if (a === void 0) return 1;