npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nest-boot/queue

v8.1.0

Published

PostgreSQL-backed BullMQ queues and optional MikroORM and GraphQL job queries

Readme

@nest-boot/queue

QueueModule configures BullMQ 6 queues and workers using the official PostgreSQL backend. Set QUEUE_DATABASE_URL or DATABASE_URL, and run BullMQ migrations before startup. Optional MikroORM and GraphQL queries read the native table. Use withQueueDatabaseConfig(config) from @nest-boot/queue in both runtime and CLI ORM configuration; it registers the entities and composes schema settings and discovery hooks. MikroORM core and decorators are required peers; DatabaseModule and GraphQL remain optional integrations. The read-only entities map all 11 native BullMQ tables, including defaults, enums, foreign keys and operational indexes. MikroORM uses its standard schema generator to add user/workspace ownership indexes. Run BullMQ migrations first; its functions and independent sequences remain owned by BullMQ. The helper uses native ignoreRoutines: true, which applies to all schemas, so existing application functions also require explicit migrations for changes. Keep MikroORM migration snapshots enabled; review live-generated rollback SQL because MikroORM 7.2.0 can restore ignored routines in down. See the queue tutorial for configuration. When the application also imports HealthCheckModule, it automatically registers a health indicator for each discovered Queue provider, including custom subclasses:

import { BaseQueue, Queue, QueueModule } from "@nest-boot/queue";
import { HealthCheckModule } from "@nest-boot/health-check";
import { Module } from "@nestjs/common";

@Queue()
class EmailQueue extends BaseQueue {}

@Module({
  imports: [HealthCheckModule, QueueModule],
  providers: [EmailQueue],
})
export class AppModule {}

Queues are discovered after application modules initialize. Provider aliases of the same instance produce one check. Keys use queue.<name>, for example queue.email and queue.upload, matching the application's registered queue names.

Each check uses the existing queue connection, requires it to be ready, and reads the queue's pause state. Readiness and reading together are limited to 1000 ms. Closing queues, unavailable connections, read failures, and timeouts report down; later checks can recover. A paused queue reports up with paused: true. The probe checks queue access, not worker availability, processing throughput, backlog, or historical failed jobs. It does not create jobs or change queue state. Repeated probes share any still-pending read for the same queue, including after a timeout; separate queues continue to be checked independently.

Without HealthCheckModule, no queues are discovered for health checks and no checks run. The module does not import it or add a health endpoint. The exported QueueHealthIndicator also supports explicit check(key, queue, timeout) calls.

Queues default to expose: false. Set @Queue({ expose: true }) and register the queue provider in the API application to include its jobs in the optional Job API. The public fields are id, queue, name, status, numeric progress and createdAt / startedAt / finishedAt. Other progress formats return null. Payloads, raw results, failure details and operational fields stay private; applications expose business results through their own authorized API. Database RLS scopes nodes, lists and counts to the verified user or workspace. Configure the request EntityManager session with the non-owner authenticated role and trusted app.user.id / app.workspace.id variables, and apply the Job RLS migration. Empty identities match no rows. BullMQ workers use a separate owner or BYPASSRLS connection. The flag affects API visibility, not BullMQ storage or direct queue operations.

QueueModule also registers nb queue:migrate for CLI modules importing CommandModule from @nest-boot/command. The command uses the configured database and schema, accepts --schema, and runs BullMQ migrations before MikroORM application migrations.

Workers and event listeners are disabled by default in every application entry. Run a separate foreground worker process with nb queue:run, or select queues with nb queue:run --queue email-queue --queue report-queue. Unknown queue names fail before consumer creation. Queue providers remain injectable in HTTP, REPL and ordinary commands, including commands that enqueue work. Scheduled handlers register at application startup; their worker starts only when selected. SIGINT and SIGTERM drain active jobs before closing application dependencies. Programmatic applications can inject QueueRegistrar and call start(queueNames?) after initialization.