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

@softprobe/softprobe-js

v2.0.14

Published

Topology-aware record & replay testing framework via OpenTelemetry

Readme

@softprobe/softprobe-js

TypeScript SDK for the Softprobe hybrid platform.

The canonical TypeScript flow is:

  1. create a replay session on softprobe-runtime
  2. load a *.case.json file
  3. use findInCase(...) to select a captured span in memory
  4. register an explicit mock with mockOutbound(...)
  5. drive the SUT through the proxy with x-softprobe-session-id

This package is the TypeScript SDK for that flow. It is not the canonical home of the product CLI or the product runtime.

Install

npm install --save-dev @softprobe/softprobe-js

Minimal replay example

import path from "path";
import { Softprobe } from "@softprobe/softprobe-js";

const softprobe = new Softprobe();

const session = await softprobe.startSession({ mode: "replay" });
await session.loadCaseFromFile(
  path.resolve("spec/examples/cases/fragment-happy-path.case.json")
);

const hit = session.findInCase({
  direction: "outbound",
  method: "GET",
  path: "/fragment",
});

await session.mockOutbound({
  direction: "outbound",
  method: "GET",
  path: "/fragment",
  response: hit.response,
});

// Then send a request to the SUT through the proxy with:
// { "x-softprobe-session-id": session.id }

await session.close();

Current public surface

The package currently exports the runtime client and the ergonomic session APIs used by the hybrid flow:

  • Softprobe
  • SoftprobeSession
  • SoftprobeRuntimeClient
  • findInCase(...)
  • mockOutbound(...)
  • clearRules()
  • close()

See:

Canonical CLI

The canonical product CLI lives in softprobe-runtime/, not in this package. If this package exposes older Node-oriented CLI entrypoints, they are compatibility surfaces rather than the preferred product path.

Legacy note

This repo still contains older Node-specific instrumentation, framework-patching, and NDJSON cassette surfaces under migration. They remain for compatibility and test coverage, but they are not the canonical Softprobe product direction. The source of truth is the proxy-first hybrid design in docs/design.md.

Release note

This package is configured (publishConfig in package.json) to publish to npm as @softprobe/softprobe-js, but this monorepo does not currently run an automated publish workflow. Historical releases under that name exist on npm, but new commits in this repo are not automatically released. Consume the package from source when you need changes that are not yet on npm:

cd softprobe-js
npm install
npm run build
# then reference ../softprobe-js from your project (file: or workspaces).

The in-repo harnesses under e2e/jest-replay/ import this package by relative path rather than from npm.

License

Apache-2.0. See LICENSE and the monorepo LICENSING.md for the full dual-license map (server components are under the Softprobe Source License 1.0).