@zintrust/queue-monitor 2.4.5 → 2.4.6

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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@zintrust/queue-monitor",
3
- "version": "2.4.3",
4
- "buildDate": "2026-06-01T13:35:49.849Z",
3
+ "version": "2.4.5",
4
+ "buildDate": "2026-06-03T09:57:58.476Z",
5
5
  "buildEnvironment": {
6
6
  "node": "v22.22.1",
7
7
  "platform": "darwin",
8
8
  "arch": "arm64"
9
9
  },
10
10
  "git": {
11
- "commit": "98a0caf4",
11
+ "commit": "feec4c80",
12
12
  "branch": "release"
13
13
  },
14
14
  "package": {
@@ -42,8 +42,8 @@
42
42
  "sha256": "3b7e85e6a0ba5dd958010bdf023052b1fb66cfbb52047554b326b4465b817719"
43
43
  },
44
44
  "build-manifest.json": {
45
- "size": 3869,
46
- "sha256": "c1ba9522a69a44edce77119e8fd9df36dff9e8797d8a040448a8659da8b0721c"
45
+ "size": 3871,
46
+ "sha256": "2b7d6b37d81ec677fb07cbd8e69566cc5fcc953b5d40d3187b1ad75c85ab57e8"
47
47
  },
48
48
  "connection.d.ts": {
49
49
  "size": 287,
@@ -78,12 +78,12 @@
78
78
  "sha256": "fb91df973acd13a88cca443e50ecdd34944c66e1a1d48333f63099079a00f3c9"
79
79
  },
80
80
  "driver.d.ts": {
81
- "size": 1782,
82
- "sha256": "a1629f48367efab3c0031ace21c5304821d01ca1d7027cc7a50b62570339c848"
81
+ "size": 1417,
82
+ "sha256": "9aa9e6ac31d8a0a3d4145a8228bd61180be89e7170b02d1290fcb732a4c217a1"
83
83
  },
84
84
  "driver.js": {
85
- "size": 12473,
86
- "sha256": "162ee0db3fe8a0cbc6378133a22d6df723a900e08ea74817c562b830a88338db"
85
+ "size": 12494,
86
+ "sha256": "038d017128abb2c1319039bfa6d1fccc72c1eaea472d2296e1efc153dd17cfd6"
87
87
  },
88
88
  "index.d.ts": {
89
89
  "size": 2344,
@@ -91,7 +91,7 @@
91
91
  },
92
92
  "index.js": {
93
93
  "size": 17226,
94
- "sha256": "79f16f77f5e56c815212ffc43718fee07cf490c4f7fd9ff0e68fa656337b8a76"
94
+ "sha256": "66b89ca171cc49187182d84d3fb9a9ae112785bd1a3cc8ea2ee103a508fcafd3"
95
95
  },
96
96
  "metrics-index.d.ts": {
97
97
  "size": 239,
@@ -118,12 +118,12 @@
118
118
  "sha256": "7aa5c97aef19ec36e1309b9abc922481924672e4017bc3fe198b5eff7dabda86"
119
119
  },
120
120
  "worker.d.ts": {
121
- "size": 338,
122
- "sha256": "6bb39529c68675846d1877b34ccb2fa2bbe9bc56a223388add24e239f24ddfc3"
121
+ "size": 347,
122
+ "sha256": "fb7751246ae88f5f470107e35f25f561da5919fd2619fe70b8b182d0c878ac0e"
123
123
  },
124
124
  "worker.js": {
125
- "size": 1239,
126
- "sha256": "46f116eb169fca1dc6dfd48d299001635c48a2da8d6e10115a98fcd33187b53e"
125
+ "size": 1376,
126
+ "sha256": "4f114198579d049482e284738cbdf35576d48bb269cc0936053911548efacb5d"
127
127
  }
128
128
  }
129
129
  }
@@ -637,6 +637,14 @@ const getRenderJobsRowHelpersFunction = () => `
637
637
  return tr;
638
638
  }
639
639
 
640
+ function formatDateTime(value) {
641
+ const date = value instanceof Date ? value : new Date(value);
642
+ if (Number.isNaN(date.getTime())) {
643
+ return '—';
644
+ }
645
+ return date.toLocaleString();
646
+ }
647
+
640
648
  function updateExistingJobRow(tr, job, idx) {
641
649
  const jobId = getJobId(job);
642
650
  const statusInfo = getJobStatusInfo(job);
@@ -651,7 +659,7 @@ const getRenderJobsRowHelpersFunction = () => `
651
659
  '<td>' + (job.queue || currentQueue) + '</td>' +
652
660
  '<td><span class="status-badge ' + statusInfo.cls + '">' + statusInfo.label + '</span></td>' +
653
661
  '<td>' + job.attempts + '</td>' +
654
- '<td>' + new Date(job.timestamp).toLocaleTimeString() + '</td>' +
662
+ '<td>' + formatDateTime(job.timestamp) + '</td>' +
655
663
  '<td>' + getJobRetryMarkup(job) + '</td>';
656
664
 
657
665
  if (job.failedReason) {
@@ -835,7 +843,7 @@ const getLockHelperFunctions = () => `
835
843
 
836
844
  function updateExistingLockRow(row, lock, idx) {
837
845
  const ttl = typeof lock.ttl === 'number' ? Math.round(lock.ttl / 1000) + 's' : '—';
838
- const expires = lock.expires ? new Date(lock.expires).toLocaleTimeString() : '—';
846
+ const expires = lock.expires ? formatDateTime(lock.expires) : '—';
839
847
 
840
848
  const ttlCell = row.children[1];
841
849
  const expiresCell = row.children[2];
@@ -851,7 +859,7 @@ const getLockHelperFunctions = () => `
851
859
  tr.dataset.lockIndex = idx;
852
860
 
853
861
  const ttl = typeof lock.ttl === 'number' ? Math.round(lock.ttl / 1000) + 's' : '—';
854
- const expires = lock.expires ? new Date(lock.expires).toLocaleTimeString() : '—';
862
+ const expires = lock.expires ? formatDateTime(lock.expires) : '—';
855
863
  const isExpanded = expandedLockKeys.has(lock.key);
856
864
 
857
865
  tr.innerHTML =
@@ -1133,7 +1141,7 @@ const getDashboardScriptEventStream = () => `
1133
1141
 
1134
1142
  const lastUpdated = document.getElementById('last-updated');
1135
1143
  if (lastUpdated) {
1136
- lastUpdated.textContent = new Date().toLocaleTimeString();
1144
+ lastUpdated.textContent = formatDateTime(new Date());
1137
1145
  }
1138
1146
  markStreamHealthy();
1139
1147
  }
@@ -1168,7 +1176,7 @@ const getFetchDataFunction = () => `
1168
1176
  updateQueueSelect(data.queues);
1169
1177
  handleQueueSelection(data);
1170
1178
  await fetchLocks();
1171
- document.getElementById('last-updated').textContent = new Date().toLocaleTimeString();
1179
+ document.getElementById('last-updated').textContent = formatDateTime(new Date());
1172
1180
  } catch (e) {
1173
1181
  showError(e.message);
1174
1182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/queue-monitor",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "Queue monitoring package for ZinTrust with BullMQ and Redis.",
5
5
  "private": false,
6
6
  "type": "module",