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

@baristaio/rpipe

v0.0.1

Published

The Redis-based pipeline for messages/data with status and state.

Readme

RPipe

RPipe is a TypeScript library designed to manage and manipulate data within a Redis database. It supports operations such as collecting, moving, and merging data based on state transitions.

Features

  • State Management: Easily manage data states and transitions.
  • Redis Integration: Seamlessly integrates with Redis for data storage and manipulation.
  • Atomic Operations: Ensures atomicity with Redis transactions.
  • Flexible Configuration: Customizable options for prefixes, postfixes, and states.

key structure

  • prefix: pipe
  • pipeName: exampleGroup
  • pipeId: 1
  • state: positing in the pipe
  • postfix: example

pipe:exampleGroup:1:collector:example exampleGroup:1:processing

Installation

To install the RPipe library, use npm:

npm install @baristaio/rpipe

Usage

Importing the Library

import { RPipe } from '@baristaio/rpipe';
import { RedisClientType } from 'redis';
import redisClient from '@baristaio/rpipe/redisClient';

Creating an Instance

const redisClient: RedisClientType = await redisClient.connect(config.redis); /* initialize your Redis client */;
const pipe = new RPipe('exampleGroup', redisClient, {
  prefix: 'pipe',
  postfix: 'example',
  collectorName: 'collector',
  states: ['processing', 'done', 'failed']
});

Registering Messages

const messages = [
  { receiver: { id: 1, name: 'receiver1' }, action: { type: 'actionType', payload: { data: 'example' } } }
];
await pipe.registerMessages(messages);

Moving Data Between States

await pipe.moveId('1', 'collector', 'processing');
await pipe.moveId('1', 'processing', 'done');

Retrieving Data

const members = await pipe.getMembers('1', 'done');
console.log(members);

Clearing Data

await pipe.clear('1', 'done');

API Reference

RPipe

Constructor

constructor(name: string, redisClient: RedisClientType, options: PipeOptions)
  • name: The name of the aggregation group.
  • redisClient: The Redis client instance.
  • options: Configuration options for the aggregator.

Methods

  • registerMessages(messages: Message[]): Promise<void>
  • moveId(id: string, fromState: string, toState: string): Promise<void>
  • next(id: string, fromState: string): Promise<void | null>
  • getMembers(key: string, state: string): Promise<string[]>
  • clear(id: string, state: string): Promise<number>

License

This project is licensed under the ISC License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Contact

For any questions or issues, please open an issue on GitHub.