@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/cli.cjs +7 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14002,9 +14002,15 @@ function getSortValue(s, key) {
|
|
|
14002
14002
|
case "projectName":
|
|
14003
14003
|
return s.projectName;
|
|
14004
14004
|
case "status":
|
|
14005
|
-
return s
|
|
14005
|
+
return statusSortValue(s);
|
|
14006
14006
|
}
|
|
14007
14007
|
}
|
|
14008
|
+
function statusSortValue(s) {
|
|
14009
|
+
const rank = s.status === "idle" ? 1 : 0;
|
|
14010
|
+
const activeAt = Date.parse(s.lastActivityAt ?? s.startedAt);
|
|
14011
|
+
const recency = String(1e15 - (Number.isNaN(activeAt) ? 0 : activeAt)).padStart(16, "0");
|
|
14012
|
+
return `${rank}:${recency}`;
|
|
14013
|
+
}
|
|
14008
14014
|
function compareValues(a, b) {
|
|
14009
14015
|
if (a === void 0 && b === void 0) return 0;
|
|
14010
14016
|
if (a === void 0) return 1;
|