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

@rantingjs/inspector

v0.1.0

Published

A dashboard of what a ranting app did: requests, queries, exceptions, jobs, mail, notifications and logs

Readme

@rantingjs/inspector

A debug assistant for ranting apps: it records the requests, commands, scheduled tasks and queued jobs the app runs, and everything they did (queries, exceptions, logs, mail, notifications, events, cache and Redis calls, outgoing HTTP requests, gate checks, models, views, dumps), and shows them in a dashboard at /inspector.

bun add --dev @rantingjs/inspector
bunx ranting install @rantingjs/inspector --skip-add   # src/config/inspector.ts
bunx ranting migrate                                 # inspector_entries, inspector_entries_tags, inspector_monitoring

The app needs DatabaseModule.

Who may open it

Everyone while app.env is local. Elsewhere whoever the viewInspector ability allows: nobody until the app defines it (nor in an app without AuthModule). Define it where the app starts:

constructor(gate: Gatekeeper) {
  gate.define('viewInspector', (user: User) => ['[email protected]'].includes(user.email));
}

Guests are refused without asking it, and the gate's before callbacks count. An authorize option ((request) => boolean) replaces the whole rule, local included.

The dashboard

A sidebar lists every kind of entry: Requests, Commands, Schedule, Jobs, then Batches, Cache, Dumps, Events, Exceptions, Gates, HTTP Client, Logs, Mail, Models, Notifications, Queries, Redis and Views. Each list loads new entries as they come in (or offers to, with auto-load off), pages back with "Load Older Entries" and filters by tag (/ focuses the search). An entry's page shows its details, its tags, the signed-in user, and for a request, command or job everything else it recorded, in tabs.

The header pauses and resumes recording (for every process, through the cache), clears every entry (Cmd/Ctrl+K too), switches auto-loading, and opens Monitoring, where tags such as Order:15 or Auth:3 are watched.

Config

src/config/inspector.ts (bunx ranting publish @rantingjs/inspector):

| Key | Default | | |---|---|---| | enabled | INSPECTOR_ENABLED, true | Off: nothing is recorded and the dashboard is gone. | | path | INSPECTOR_PATH, inspector | Where the dashboard and its API (/inspector/inspector-api) live. | | domain | INSPECTOR_DOMAIN, any | Serve the dashboard on this domain only (404 on others). | | storage.connection | INSPECTOR_DB_CONNECTION, the default | The connection of the inspector tables. | | onlyPaths / ignorePaths | [] / ['metrics*', '.well-known*'] | Which request paths are recorded (* matches anything). | | ignoreCommands | [] | Commands during which nothing is recorded (workers record each job instead of themselves). | | watchers | all on | One key per watcher, true/false or options; each has an INSPECTOR_<NAME>_WATCHER switch. | | filter | everything locally, else failures | Which entries are kept (see below). | | filterBatch, tag | unset | Decide on a whole batch; add tags to entries. | | hideRequestHeaders | authorization (+ cookie, set-cookie, CSRF headers outside local) | Shown as ********. | | hideRequestParameters | password, password_confirmation (+ _token outside local) | Shown as ********, dot notation for nested ones. | | hideResponseParameters | [] | | | recordFrameworkEvents | false | Show the framework's own events on the Events screen too. | | night | false | The dark theme. | | avatar, authorize | Gravatar, unset | The signed-in user's picture; who may open the dashboard instead of the rule above. |

Watcher options: cache.hidden / cache.ignore (key patterns), clientRequest.ignoreHosts / sizeLimit, command.ignore, dump.always, event.ignore, gate.ignoreAbilities, log.level (error by default), model.hydrations / model.ignore, query.slow (100 ms) / ignorePaths, request.sizeLimit (64 KB) / ignoreHttpMethods / ignoreStatusCodes.

The default filter keeps everything in the local environment; elsewhere only reported exceptions, failed requests (5xx) and jobs, scheduled tasks and entries carrying a monitored tag:

filter: (entry) => local || entry.isReportableException() || entry.isFailedRequest() || entry.isFailedJob() || entry.isScheduledTask() || entry.hasMonitoredTag(),

How it records

  • Everything one request, command or job records is stored together when it ends, as one batch, through the running transaction if there is one. A queued job's entry is recorded when it is dispatched (pending) and updated by the worker that runs it (processed, or failed with its exception and the failed tag).
  • Tags come by themselves: Auth:<id> for the signed-in user, Order:15 for the models an event, job, mail, notification or exception carries (an object's own tags() method wins), the recipients of mail, the host of an outgoing request, slow for slow queries.
  • Queries show the line of the app's code that ran them, when the stack still has it; the inspector's own queries are left out.
  • Exceptions are grouped by the place they were thrown: the list shows each once with its count, and an entry can be marked resolved.
  • dump(value) (from @rantingjs/framework) prints to the console; while the Dumps screen is open (or with dump.always) dumps go there instead.
  • Files served from public/ are not requests of the app: they are left out.

Commands

bunx ranting inspector:list [type] [--tag Auth:1] [--limit 20] [--before 1234] [--json]
bunx ranting inspector:show <id | latest | latest:query> [--full] [--json]   # an entry and what its batch did
bunx ranting inspector:prune --hours 48 [--keep-exceptions]                     # older than 48 hours (24 by default)
bunx ranting inspector:clear
bunx ranting inspector:pause / inspector:resume

Schedule pruning in src/schedule.ts: schedule.command('inspector:prune').daily().