@zintrust/queue-monitor 2.1.6 → 2.1.8

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
  import type { IRequest, IResponse } from '@zintrust/core/http';
2
- import type { QueueDriver } from './driver';
3
- import type { LockAnalytics, QueueMonitorSnapshot } from './index';
4
- import type { JobSummary, Metrics } from './metrics';
2
+ import type { QueueDriver } from './driver.js';
3
+ import type { LockAnalytics, QueueMonitorSnapshot } from './index.js';
4
+ import type { JobSummary, Metrics } from './metrics.js';
5
5
  export declare const ALL_QUEUES = "__all__";
6
6
  type QueueSnapshotData = {
7
7
  type: string;
@@ -2,4 +2,4 @@
2
2
  * Queue Monitor Dashboard UI - Non-runtime entrypoint
3
3
  * Contains the dashboard UI components for development/admin use
4
4
  */
5
- export { getDashboardHtml } from './dashboard-ui';
5
+ export { getDashboardHtml } from './dashboard-ui.js';
@@ -2,4 +2,4 @@
2
2
  * Queue Monitor Dashboard UI - Non-runtime entrypoint
3
3
  * Contains the dashboard UI components for development/admin use
4
4
  */
5
- export { getDashboardHtml } from './dashboard-ui';
5
+ export { getDashboardHtml } from './dashboard-ui.js';
@@ -1,4 +1,4 @@
1
- import { BrandFavicon } from './BrandFavicon';
1
+ import { BrandFavicon } from './BrandFavicon.js';
2
2
  const resolveAppName = (appName) => {
3
3
  return typeof appName === 'string' && appName.trim() !== '' ? appName.trim() : 'ZinTrust';
4
4
  };
@@ -2,5 +2,5 @@
2
2
  * Queue Monitor Driver - Runtime-only entrypoint
3
3
  * Contains only the core queue driver functionality for production Workers
4
4
  */
5
- export type { JobPayload, JobCounts, RetrySnapshot, RetryJobResult, QueueDriver } from './driver';
6
- export { createBullMQDriver } from './driver';
5
+ export { createBullMQDriver } from './driver.js';
6
+ export type { JobCounts, JobPayload, QueueDriver, RetryJobResult, RetrySnapshot, } from './driver.js';
@@ -2,4 +2,4 @@
2
2
  * Queue Monitor Driver - Runtime-only entrypoint
3
3
  * Contains only the core queue driver functionality for production Workers
4
4
  */
5
- export { createBullMQDriver } from './driver';
5
+ export { createBullMQDriver } from './driver.js';
package/dist/driver.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Job, JobsOptions } from 'bullmq';
2
- import { type RedisConfig } from './connection';
2
+ import { type RedisConfig } from './connection.js';
3
3
  export type JobPayload<T = unknown> = T;
4
4
  export type JobCounts = Record<string, number>;
5
5
  export type RetrySnapshot = {
package/dist/driver.js CHANGED
@@ -2,7 +2,7 @@ import { ErrorFactory } from '@zintrust/core/errors';
2
2
  import { Logger } from '@zintrust/core/logger';
3
3
  import { getBullMQSafeQueueName } from '@zintrust/core/redis';
4
4
  import { Queue } from 'bullmq';
5
- import { createRedisConnection } from './connection';
5
+ import { createRedisConnection } from './connection.js';
6
6
  async function enrichJobsWithState(jobs) {
7
7
  await Promise.all(jobs.map(async (job) => {
8
8
  try {
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import { type IRouter } from '@zintrust/core/http';
2
- import { type RedisConfig } from './connection';
3
- import { type QueueDriver } from './driver';
4
- import { type Metrics } from './metrics';
5
- export type { JobPayload } from './driver';
6
- export { createMetrics, type JobStatus, type JobSummary, type Metrics } from './metrics';
7
- export { createWorker as createQueueWorker, type QueueWorker } from './worker';
2
+ import { type RedisConfig } from './connection.js';
3
+ import { type QueueDriver } from './driver.js';
4
+ import { type Metrics } from './metrics.js';
5
+ export { getRecentJobsForQueue, getRecentJobsForSelection, QueueMonitoringService, QueueMonitoringStream, } from './QueueMonitoringService.js';
6
+ export { createBullMQDriver } from './driver.js';
7
+ export type { JobPayload, QueueDriver } from './driver.js';
8
+ export { createMetrics, type JobStatus, type JobSummary, type Metrics } from './metrics.js';
9
+ export { createWorker as createQueueWorker, type QueueWorker } from './worker.js';
8
10
  export type QueueMonitorConfig = {
9
11
  enabled?: boolean;
10
12
  basePath?: string;
@@ -63,7 +65,6 @@ export declare const QueueMonitor: Readonly<{
63
65
  create(config: QueueMonitorConfig): QueueMonitorApi;
64
66
  }>;
65
67
  export default QueueMonitor;
66
- export { createBullMQDriver } from './driver';
67
68
  /**
68
69
  * Package version and build metadata
69
70
  * Available at runtime for debugging and health checks
package/dist/index.js CHANGED
@@ -4,13 +4,15 @@ import { Logger } from '@zintrust/core/logger';
4
4
  import { resolveLockPrefix } from '@zintrust/core/queue';
5
5
  import { isNonEmptyString } from '@zintrust/core/utils';
6
6
  import { ShutdownTrace } from '@zintrust/core/workers';
7
- import { createRedisConnection } from './connection';
8
- import { getDashboardHtml } from './dashboard-ui';
9
- import { createBullMQDriver } from './driver';
10
- import { createMetrics } from './metrics';
11
- import { getRecentJobsForSelection, QueueMonitoringStream } from './QueueMonitoringService';
12
- export { createMetrics } from './metrics';
13
- export { createWorker as createQueueWorker } from './worker';
7
+ import { createRedisConnection } from './connection.js';
8
+ import { getDashboardHtml } from './dashboard-ui.js';
9
+ import { createBullMQDriver as createQueueDriver, } from './driver.js';
10
+ import { createMetrics } from './metrics.js';
11
+ import { getRecentJobsForSelection, QueueMonitoringStream } from './QueueMonitoringService.js';
12
+ export { getRecentJobsForQueue, getRecentJobsForSelection, QueueMonitoringService, QueueMonitoringStream, } from './QueueMonitoringService.js';
13
+ export { createBullMQDriver } from './driver.js';
14
+ export { createMetrics } from './metrics.js';
15
+ export { createWorker as createQueueWorker } from './worker.js';
14
16
  const DEFAULTS = {
15
17
  enabled: true,
16
18
  basePath: '/queue-monitor',
@@ -337,7 +339,7 @@ export const QueueMonitor = Object.freeze({
337
339
  db: queueConfig.drivers.redis.database,
338
340
  };
339
341
  }
340
- const driver = createBullMQDriver(redisConfig);
342
+ const driver = createQueueDriver(redisConfig);
341
343
  const metrics = createMetrics(redisConfig);
342
344
  const startedAt = new Date().toISOString();
343
345
  ShutdownTrace.logHandles('queue-monitor.create', {
@@ -368,7 +370,6 @@ export const QueueMonitor = Object.freeze({
368
370
  },
369
371
  });
370
372
  export default QueueMonitor;
371
- export { createBullMQDriver } from './driver';
372
373
  /**
373
374
  * Package version and build metadata
374
375
  * Available at runtime for debugging and health checks
@@ -2,5 +2,5 @@
2
2
  * Queue Monitor Metrics - Runtime-only entrypoint
3
3
  * Contains only the metrics functionality for production Workers
4
4
  */
5
- export type { JobStatus, JobSummary, Metrics } from './metrics';
6
- export { createMetrics } from './metrics';
5
+ export { createMetrics } from './metrics.js';
6
+ export type { JobStatus, JobSummary, Metrics } from './metrics.js';
@@ -2,4 +2,4 @@
2
2
  * Queue Monitor Metrics - Runtime-only entrypoint
3
3
  * Contains only the metrics functionality for production Workers
4
4
  */
5
- export { createMetrics } from './metrics';
5
+ export { createMetrics } from './metrics.js';
package/dist/metrics.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Job, type JobsOptions } from 'bullmq';
2
- import { type RedisConfig } from './connection';
2
+ import { type RedisConfig } from './connection.js';
3
3
  export type JobStatus = 'completed' | 'failed';
4
4
  export type JobSummary = {
5
5
  id: string | undefined;
package/dist/metrics.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RedisKeys } from '@zintrust/core/queue';
2
- import { createRedisConnection } from './connection';
2
+ import { createRedisConnection } from './connection.js';
3
3
  /**
4
4
  * Creates a queue monitoring key using singleton RedisKeys
5
5
  * @param type - Type of monitoring key (stats, recent, failed)
@@ -2,12 +2,12 @@
2
2
  * Queue Monitor - Runtime-only entrypoint for production Workers
3
3
  * Excludes dashboard UI components that are not needed for runtime
4
4
  */
5
- import { type RedisConfig } from './connection';
6
- import { type QueueDriver } from './driver';
7
- import { type Metrics } from './metrics';
8
- export type { JobPayload } from './driver';
9
- export { createMetrics, type JobStatus, type JobSummary, type Metrics } from './metrics';
10
- export { createWorker as createQueueWorker, type QueueWorker } from './worker';
5
+ import { type RedisConfig } from './connection.js';
6
+ import { type QueueDriver } from './driver.js';
7
+ import { type Metrics } from './metrics.js';
8
+ export type { JobPayload } from './driver.js';
9
+ export { createMetrics, type JobStatus, type JobSummary, type Metrics } from './metrics.js';
10
+ export { createWorker as createQueueWorker, type QueueWorker } from './worker.js';
11
11
  export type QueueMonitorConfig = {
12
12
  enabled?: boolean;
13
13
  basePath?: string;
@@ -65,7 +65,7 @@ export declare const QueueMonitor: Readonly<{
65
65
  create(config: QueueMonitorConfig): QueueMonitorApi;
66
66
  }>;
67
67
  export default QueueMonitor;
68
- export { createBullMQDriver } from './driver';
68
+ export { createBullMQDriver } from './driver.js';
69
69
  /**
70
70
  * Package version and build metadata
71
71
  * Available at runtime for debugging and health checks
@@ -7,11 +7,11 @@ import { Logger } from '@zintrust/core/logger';
7
7
  import { resolveLockPrefix } from '@zintrust/core/queue';
8
8
  import { isNonEmptyString } from '@zintrust/core/utils';
9
9
  import { ShutdownTrace } from '@zintrust/core/workers';
10
- import { createRedisConnection } from './connection';
11
- import { createBullMQDriver } from './driver';
12
- import { createMetrics } from './metrics';
13
- export { createMetrics } from './metrics';
14
- export { createWorker as createQueueWorker } from './worker';
10
+ import { createRedisConnection } from './connection.js';
11
+ import { createBullMQDriver } from './driver.js';
12
+ import { createMetrics } from './metrics.js';
13
+ export { createMetrics } from './metrics.js';
14
+ export { createWorker as createQueueWorker } from './worker.js';
15
15
  const DEFAULTS = {
16
16
  enabled: true,
17
17
  basePath: '/queue-monitor',
@@ -229,7 +229,7 @@ export const QueueMonitor = Object.freeze({
229
229
  },
230
230
  });
231
231
  export default QueueMonitor;
232
- export { createBullMQDriver } from './driver';
232
+ export { createBullMQDriver } from './driver.js';
233
233
  /**
234
234
  * Package version and build metadata
235
235
  * Available at runtime for debugging and health checks
package/dist/worker.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type Processor } from 'bullmq';
2
- import { type RedisConfig } from './connection';
3
- import type { Metrics } from './metrics';
2
+ import { type RedisConfig } from './connection.js';
3
+ import type { Metrics } from './metrics.js';
4
4
  export type QueueWorker = {
5
5
  close: () => Promise<void>;
6
6
  };
package/dist/worker.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getBullMQSafeQueueName } from '@zintrust/core/redis';
2
2
  import { Worker } from 'bullmq';
3
- import { createRedisConnection } from './connection';
3
+ import { createRedisConnection } from './connection.js';
4
4
  export const createWorker = (queueName, processor, redisConfig, metrics) => {
5
5
  const connection = createRedisConnection(redisConfig, 3, { subsystem: 'queue-monitor-worker' });
6
6
  const prefix = getBullMQSafeQueueName();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/queue-monitor",
3
- "version": "2.1.6",
3
+ "version": "2.1.8",
4
4
  "description": "Queue monitoring package for ZinTrust with BullMQ and Redis.",
5
5
  "private": false,
6
6
  "type": "module",