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

@combycode/dpe-framework-ts

v2.0.3

Published

DPE framework for building streaming pipeline tools in TypeScript/Bun

Readme

@combycode/dpe-framework-ts

DPE framework for building streaming pipeline tools in TypeScript / Bun.

A DPE tool is an independent program: it reads NDJSON envelopes from stdin, processes each one, and writes NDJSON envelopes to stdout. The runner (dpe) spawns it, pipes data through it, and routes its output to the next stage. The framework handles the loop, the parsing, the queues, and the error/trace plumbing — your code only writes the transform.

Targets Bun by default. Node 20+ should also work but isn't part of CI.

Install

bun add @combycode/dpe-framework-ts

Hello tool

// src/main.ts
import { run, type Context, type JSONValue } from "@combycode/dpe-framework-ts";

async function processInput(v: JSONValue, _settings: JSONValue, ctx: Context) {
    ctx.output(v);
}

await run({ input: processInput });

Run as a tool: bun src/main.ts '{"...settings JSON..."}'. The runner will pass settings as argv[1] and pipe NDJSON through stdin/stdout.

Processor signature

type Processor = (
    v: JSONValue,
    settings: JSONValue,
    ctx: Context,
) => void | Promise<void>;

Both sync and async processors are supported. The runtime awaits each call before reading the next stdin line, so you can await I/O without losing ordering.

Internal queues

import { run, type Context, type JSONValue } from "@combycode/dpe-framework-ts";

async function processInput(v: JSONValue, _s: JSONValue, ctx: Context) {
    ctx.emit("validate", v);
}

async function processValidate(v: JSONValue, _s: JSONValue, ctx: Context) {
    if ((v as any).ok === true) ctx.output(v);
    else ctx.error(v, "validation failed");
}

await run({
    input: processInput,
    queues: { validate: processValidate },
});

ctx.emit(queue, v) enqueues for the named handler. await ctx.drain() flushes all queues before continuing.

Context API (essentials)

| Call | What it does | |---|---| | ctx.output(v, id?, src?) | Emit {t:"d",...} to stdout. id/src default to inherit. | | ctx.emit(queue, v) | Push to internal queue. | | ctx.drain() | Resolve once every queue is drained. | | ctx.error(v, msg) | Write {type:"error",input:v,error:msg,...} to stderr. | | ctx.log(level, msg) | Structured stderr log. | | ctx.meta(v) | Emit {t:"m", v} envelope to stdout. | | ctx.memory | Typed accumulators (Number, Average, MinMax, Set, Map, …). |

See docs/frameworks.md in the monorepo for the full reference.

Scaffolding

dpe-dev scaffold --name my-tool --runtime bun --out ./my-tool --description "what it does"
cd my-tool
dpe-dev build .   # bun install
dpe-dev test  .   # bun test

End-to-end stage testing happens via dpe test <pipeline>:<stage> once the tool is wired into a pipeline — see docs/testing.md.

Repo & licence