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

@veriops/sdk-js

v0.1.8

Published

JavaScript SDK for VeriOps Observability Runbooks

Readme

@veriops/sdk-js

A lightweight JavaScript SDK for emitting run/step events to a VeriOps-compatible observability backend.

Features

  • Buffered event ingestion to POST /v1/events
  • Per-request context via AsyncLocalStorage
  • Express middleware that emits run.start and run.end
  • Step helpers for measuring latency and capturing structured inputs/outputs
  • Conservative sanitization (drops secret-like keys, truncates long strings)

Install

npm i @veriops/sdk-js




Configuration

Set environment variables at runtime:

OBS_BASE_URL (default: http://localhost:8000)

OBS_API_KEY (required for secured backends)

OBS_PROJECT_ID (your project identifier)


Example:
export OBS_BASE_URL=http://localhost:8000
export OBS_API_KEY=dev-key
export OBS_PROJECT_ID=my-project



Express usage:

import express from "express";
import { veriopsMiddleware } from "@veriops/sdk-js";

const app = express();

// Creates a run per request under /api and emits run.start/run.end
app.use("/api", veriopsMiddleware({ runbook: "my_runbook_v1" }));

app.get("/api/ping", (req, res) => {
  res.json({ ok: true });
});

app.listen(3000);




Emitting internal steps:

import { getCtx, obs } from "@veriops/sdk-js";

function startStep(name, tool, input) {
  const ctx = getCtx();
  const runId = ctx?.runId;
  if (!runId) return null;

  const stepId = obs.newStepId();
  const index = ctx ? ctx.stepIndex++ : 0;

  obs.stepStart({ runId, stepId, index, name, tool, input });
  return { runId, stepId, t0: Date.now() };
}

function endStep(h, status, output) {
  if (!h) return;
  obs.stepEnd({
    runId: h.runId,
    stepId: h.stepId,
    status,
    output,
    latencyMs: Date.now() - h.t0,
  });
}



Manual emit (no Express):

import { ObsEmitter } from "@veriops/sdk-js";

const o = new ObsEmitter({
  baseUrl: process.env.OBS_BASE_URL,
  apiKey: process.env.OBS_API_KEY,
  projectId: process.env.OBS_PROJECT_ID,
});

const runId = o.newRunId();
o.runStart({ runId, runbook: "manual_test" });

const stepId = o.newStepId();
o.stepStart({ runId, stepId, index: 0, name: "ping", tool: "node.test", input: { ok: true } });
o.stepEnd({ runId, stepId, status: "ok", output: { done: true }, latencyMs: 5 });

o.runEnd({ runId, totals: { tokens: 0, cost_usd: 0.0 } });
await o.flush();



Node version

Node.js 18+ is required (uses built-in fetch).



License

MIT