@zintrust/queue-monitor 0.4.67 → 0.4.68

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@zintrust/queue-monitor",
3
- "version": "0.4.67",
4
- "buildDate": "2026-04-06T10:10:02.087Z",
3
+ "version": "0.4.68",
4
+ "buildDate": "2026-04-06T11:27:30.655Z",
5
5
  "buildEnvironment": {
6
6
  "node": "v22.22.1",
7
7
  "platform": "darwin",
@@ -41,8 +41,8 @@
41
41
  "sha256": "60f993a42f4a9dd5000b01dae3b0f105a8f4348da8433a735b5cc1929a8f64ce"
42
42
  },
43
43
  "build-manifest.json": {
44
- "size": 3865,
45
- "sha256": "958a2cfca8d3b2319db03165adb88c03acc468112e7c893eada9671d969ead95"
44
+ "size": 3866,
45
+ "sha256": "e21e6549e0ce2dda75dcfb4f0f8551300c9bd2c5ff58bb041525c216cae45551"
46
46
  },
47
47
  "config/queueMonitor.d.ts": {
48
48
  "size": 407,
@@ -69,12 +69,12 @@
69
69
  "sha256": "1d4e9b5f2a03e0a3885d578276eb5c6a05c50ce4a2d84b241e68fe6ace76e7dd"
70
70
  },
71
71
  "dashboard-ui.d.ts": {
72
- "size": 197,
73
- "sha256": "1b487b6e9cedbcb00cde7e920fb128724cb21aa154160e0bd02b02e2a0bd7334"
72
+ "size": 219,
73
+ "sha256": "5140191207b5620500ac5e1edacefed65956a1ad88739695d545ea7d2b405243"
74
74
  },
75
75
  "dashboard-ui.js": {
76
- "size": 54004,
77
- "sha256": "235f5ff99220d835738fe0bf09966c4dd7198040dfa915644e6005500e125ab9"
76
+ "size": 54241,
77
+ "sha256": "36d36915fe36e213823a916a03244cdbe4a1b10af87d6eb8780a24f2ce59347b"
78
78
  },
79
79
  "driver.d.ts": {
80
80
  "size": 707,
@@ -89,8 +89,8 @@
89
89
  "sha256": "2556c136641769f4e7cd81abd6ecae8663433aba74b09bc507b8fba01e3fc6f5"
90
90
  },
91
91
  "index.js": {
92
- "size": 12811,
93
- "sha256": "ce642e3d1aef1ebb5b339c2ed3c58fb60aee6e63a301e8fbbd333d248378b66d"
92
+ "size": 12870,
93
+ "sha256": "e9e37205072da70aacff5c2b46bdf01a17dc7cc507d201541a9c0bd2483f8cc8"
94
94
  },
95
95
  "metrics.d.ts": {
96
96
  "size": 868,
@@ -2,5 +2,6 @@ export type DashboardUiOptions = {
2
2
  basePath: string;
3
3
  autoRefresh: boolean;
4
4
  refreshIntervalMs: number;
5
+ appName?: string;
5
6
  };
6
7
  export declare const getDashboardHtml: (options: DashboardUiOptions) => string;
@@ -1,3 +1,6 @@
1
+ const resolveAppName = (appName) => {
2
+ return typeof appName === 'string' && appName.trim() !== '' ? appName.trim() : 'ZinTrust';
3
+ };
1
4
  const getRootAndThemeVariables = () => `
2
5
  :root {
3
6
  --bg: #0b1220;
@@ -125,14 +128,14 @@ const getDashboardStyles = () => [
125
128
  getStatusBadgeStyles(),
126
129
  getInteractiveStyles(),
127
130
  ].join('\n');
128
- const getHeaderSection = () => `
131
+ const getHeaderSection = (appName) => `
129
132
  <header>
130
133
  <div class="brand">
131
134
  <div class="logo-frame">
132
135
  ${getLogoSvg()}
133
136
  </div>
134
137
  <div>
135
- <b>ZinTrust</b>
138
+ <b>${appName}</b>
136
139
  <span>Queue Monitor</span>
137
140
  </div>
138
141
  </div>
@@ -223,10 +226,10 @@ const getJobsSection = () => `
223
226
  </div>
224
227
  </div>
225
228
  `;
226
- const getDashboardBody = () => `
229
+ const getDashboardBody = (appName) => `
227
230
  <div class="page">
228
231
  <div class="shell">
229
- ${getHeaderSection()}
232
+ ${getHeaderSection(appName)}
230
233
 
231
234
  <section id="error-container"></section>
232
235
 
@@ -1301,21 +1304,24 @@ const getDashboardScript = (options) => [
1301
1304
  getDashboardScriptRender(),
1302
1305
  getDashboardScriptBootstrap(),
1303
1306
  ].join('\n');
1304
- export const getDashboardHtml = (options) => `<!DOCTYPE html>
1307
+ export const getDashboardHtml = (options) => {
1308
+ const appName = resolveAppName(options.appName);
1309
+ return `<!DOCTYPE html>
1305
1310
  <html lang="en">
1306
1311
  <head>
1307
1312
  <meta charset="UTF-8">
1308
1313
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1309
- <title>ZinTrust Queue Monitor</title>
1314
+ <title>${appName} Queue Monitor</title>
1310
1315
  <style>
1311
1316
  ${getDashboardStyles()}
1312
1317
  </style>
1313
1318
  </head>
1314
1319
  <body>
1315
- ${getDashboardBody()}
1320
+ ${getDashboardBody(appName)}
1316
1321
 
1317
1322
  <script>
1318
1323
  ${getDashboardScript(options)}
1319
1324
  </script>
1320
1325
  </body>
1321
1326
  </html>`;
1327
+ };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isArray, isNonEmptyString, Logger, queueConfig, resolveLockPrefix, Router, } from '@zintrust/core';
1
+ import { Env, isArray, isNonEmptyString, Logger, queueConfig, resolveLockPrefix, Router, } from '@zintrust/core';
2
2
  import { createRedisConnection } from './connection';
3
3
  import { getDashboardHtml } from './dashboard-ui';
4
4
  import { createBullMQDriver } from './driver';
@@ -230,6 +230,7 @@ function registerDashboardRoutes(router, settings, routeOptions) {
230
230
  basePath: settings.basePath,
231
231
  autoRefresh: settings.autoRefresh,
232
232
  refreshIntervalMs: settings.refreshIntervalMs,
233
+ appName: Env.get('APP_NAME', 'ZinTrust'),
233
234
  }));
234
235
  };
235
236
  // Dashboard HTML
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/queue-monitor",
3
- "version": "0.4.67",
3
+ "version": "0.4.68",
4
4
  "description": "Queue monitoring package for ZinTrust with BullMQ and Redis.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "node": ">=20.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@zintrust/core": "^0.4.67"
23
+ "@zintrust/core": "^0.4.68"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"