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

@praser/roomba-core

v2.0.2

Published

Core business rules for roomba

Readme

@praser/roomba-core

The shared vocabulary of roomba: the domain types and the RoomSource contract that every data source implements. This package contains no I/O and no scraping — just types. That keeps sources and the CLI decoupled and makes the whole system testable.

Part of the roomba monorepo.

Types

Console

A game console offered by a source.

interface Console {
  name: string;   // "PlayStation 2"
  alias: string;  // "PS2" — stable, unique key used to address the console
}

GameFile

A single downloadable file. One game release can expand into several of these — one per disc, revision, and format variation.

interface GameFile {
  name: string;        // full title incl. region/disc/revision/format markers
  region: string;      // "USA, Canada"
  version: string;     // "1.0"
  languages: string;   // "en,fr,es"
  rating: string;      // "9.6"
  size: string;        // "330 MB"
  downloadUrl: string; // direct URL for this specific file
}

RoomSource

The interface every source implements.

interface RoomSource {
  id: string;
  baseURL: URL;

  /** List every console this source offers. */
  loadConsoles(): Promise<Console[]>;

  /** Resolve a console alias to this source's URL for it. */
  resolve(alias: string): URL;

  /** Search a console (by alias) for games, one entry per file. */
  search(alias: string, query: string): Promise<GameFile[]>;

  /**
   * If this source recognizes the download URL, return the request (URL plus
   * any required headers) needed to fetch it; otherwise null.
   */
  downloadRequest(url: URL): DownloadRequest | null;
}

Design notes:

  • Sources return the full list. Region/language filtering and case-insensitive alias matching are done by the CLI, not here — so a new source only implements fetch + parse.
  • downloadRequest describes, it doesn't fetch. A source declares which URLs it owns and what headers they need (e.g. a Referer); the CLI performs the streaming download. This keeps large-file handling out of sources.

DownloadRequest

interface DownloadRequest {
  url: URL;
  headers: Record<string, string>;
}

Fetcher / HttpResponse

An injectable HTTP-GET abstraction. Sources fetch through a Fetcher so callers can layer caching (or not) around it transparently — the source never knows whether it is cached.

interface HttpResponse {
  status: number;
  ok: boolean;
  body: string;
}

type Fetcher = (url: URL, headers?: Record<string, string>) => Promise<HttpResponse>;

License

MIT