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

@streetjs/devtools

v1.0.0

Published

Street Framework Interactive Developer Experience: a browser bundle delivering the Playground (route/middleware/plugin testing + OpenAPI viewer), Route Explorer, Dependency Graph Visualizer, and API Inspector, gated by a token-based, read-only authn/authz

Readme

@streetjs/devtools

The StreetJS Framework Interactive Developer Experience — a single, self-contained browser bundle that lets you explore and exercise a running StreetJS application. It is generated by this package and embedded into the GitHub Pages docs site.

Four tools, delivered as a browser experience:

  • Playground — route, middleware, and plugin testing plus an OpenAPI viewer.
  • Route Explorer — a visual route tree; each registered route shows its HTTP method and path.
  • Dependency Graph Visualizer — module dependencies drawn as nodes and edges.
  • API Inspector — issue a request and inspect the response status, headers, and body; on failure it shows an error and retains the submitted input.

The tools reuse the pure data builders from streetjs (buildRouteTree, buildDependencyGraph, inspectorSuccess/inspectorFailure, openApiToHtml) so the framework and the tools agree on the data model.

Security: token-gated and read-only (enforced)

The access model is declared and enforced, not just documented.

  • Authentication — token-gated. Every request the tools make against the inspected app requires a bearer access token. The raw token is never stored; DevtoolsAuthGate keeps only its SHA-256 hash and compares it in constant time (crypto.timingSafeEqual). Missing / empty / wrong token → 401.
  • Authorization — read-only. Even an authenticated caller may only issue safe methods (GET, HEAD, OPTIONS). Any mutating method → 403. The tools cannot change the inspected app's state.

The authoritative gate is DevtoolsAuthGate (server side). The browser client mirrors the same policy: nothing leaves the page without a token, mutating operations are disabled, and the token lives in memory only.

import { DevtoolsAuthGate } from '@streetjs/devtools';

const gate = DevtoolsAuthGate.fromToken(process.env.DEVTOOLS_TOKEN!);
const decision = gate.authorizeHeader(req.headers.authorization, req.method);
if (!decision.allowed) {
  res.statusCode = decision.status; // 401 (unauthenticated) | 403 (read-only)
  res.end(decision.reason);
}

Generate the bundle

npm run build            # compile to dist/
npm run build:docs       # emit docs/devtools/index.html for the Pages site
npx streetjs-devtools --out path/to/index.html   # render the demo bundle

For a live app:

import { buildDevtoolsData, renderDevtoolsBundle } from '@streetjs/devtools';

const html = renderDevtoolsBundle(
  buildDevtoolsData(app, { baseUrl: 'https://api.example.com', dependencyEntry: 'src/main.ts' }),
);

Tests

npm run test:run         # compile tests then run them with node:test

Covers the gate's fail-closed enforcement (token + read-only), the gated API Inspector flow (success, denial-before-network, failure with retained input), and the browser bundle rendering (all four tools, route tree, embedded graph, script-tag escaping).