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

@fuaran-ui/mock

v0.5.0

Published

A local, offline stand-in for the Fuaran generation endpoint — serves the same TurnRequest/TurnResult contract but returns canonical trees by prompt match. Deterministic, zero-secret (no access token, no BYOK key), CI/sandbox-safe. Build + test an SDK int

Readme

@fuaran-ui/mock

A local, offline stand-in for the Fuaran generation endpoint. It speaks the same TurnRequest → TurnResult contract but returns canonical trees by prompt match from the bundled conformance corpus — so you can build and test a full SDK integration loop with no access token and no BYOK token spend, then swap to the real endpoint with a single base-URL change.

Deterministic, zero-secret, and dependency-light (Node stdlib only) — safe to run in CI and agent sandboxes.

One-command start

npx @fuaran-ui/mock            # listens on http://127.0.0.1:8123
npx @fuaran-ui/mock --port 9000
FUARAN_MOCK_PORT=9000 npx @fuaran-ui/mock

GET /health is a readiness probe; POST <any path> with a TurnRequest body returns a TurnResult.

Point an SDK at it

The only change from the real endpoint is the base URL — no token, no key:

TypeScript (@fuaran-ui/client):

import { FuaranClient } from '@fuaran-ui/client';

const client = new FuaranClient({ endpoint: 'http://127.0.0.1:8123' });
const result = await client.generate({ prompt: 'a metric strip showing revenue' });
// result.kind === 'produced'; result.treeJson decodes to a real Node.

F# (Fuaran.UI.Client):

open Fuaran.UI.Client
let client = FuaranClient(FuaranClientConfig.create "http://127.0.0.1:8123")
// client.Generate(GenerateArgs.prompt "a metric strip showing revenue")

When you are ready to go live, change endpoint to the real generation endpoint URL and supply your access token + BYOK key — nothing else in your code changes.

Behaviour

  • Prompt → tree. The prompt is matched to a bundled fixture by keyword (metric / dashboard / form / button / callout / heading / badge); a no-match returns a deterministic placeholder tree, never an error.
  • Fresh vs. repair. A request with no CurrentTreeJson is a fresh generation (an empty op list); a request carrying a current tree is a repair (a small canonical TreeOp in Ops).
  • Zero-secret. AccessToken / ByokKey are read from nowhere and required by nothing; nothing is logged per request.
  • Surface version. Every produced turn echoes the surface-version stamp the SDKs are built against.

Library use

The handler and server are also importable for embedding in a test harness:

import { handleTurn, createMockServer, startMockServer, matchTree } from '@fuaran-ui/mock';

const { server, port } = await startMockServer({ port: 0 }); // 0 → an ephemeral free port