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

@zero.core/api-framework-redis-streams-plugin

v1.0.0

Published

Redis Streams provider plugin for the ZeroCore API framework.

Readme

ZeroCore Redis Streams Provider Plugin

@zero.core/api-framework-redis-streams-plugin registers a Redis Streams provider with the @zero.core/api-framework pub/sub bus.

Implemented Scope

  • RedisStreamsPubSubProvider
  • RedisStreamsPubSubPlugin
  • RedisStreamsProviderOptions
  • RedisStreamsProviderErrorContext
  • RedisStreamsProviderErrorHandler
  • structural RedisStreamsClient, RedisStreamsReadRequest, and RedisStreamsMessage contracts

This package does not bundle a Redis client. Pass node-redis, ioredis, or a thin adapter that implements RedisStreamsClient.

Installation

yarn add @zero.core/api-framework @zero.core/api-framework-redis-streams-plugin

Usage

import { ApiRouter, MemoryPubSubProvider, PubSubBus, ServiceContainer } from "@zero.core/api-framework";
import { RedisStreamsPubSubPlugin } from "@zero.core/api-framework-redis-streams-plugin";

const services = new ServiceContainer();
const pubSub = new PubSubBus(new MemoryPubSubProvider("local"), registrations, {
  defaultProvider: "redis-streams",
  services
});

services.addInstance(PubSubBus, pubSub);

new ApiRouter(app, controllers, {
  services,
  plugins: [
    new RedisStreamsPubSubPlugin(redisStreamsClient, {
      streamPrefix: "zerocore",
      consumerGroup: "api",
      consumerName: "api-1",
      onError: (error, context) => {
        logger.error({ error, context }, "Redis Streams pub/sub delivery failed");
      }
    })
  ]
}).register();

await pubSub.start();

Use provider: "redis-streams" in @Subscribe() or pubSub.publish() options to select this provider explicitly.

Verification Stages

yarn typecheck
yarn test:contracts
yarn test:unit
yarn build

Run the full gate:

yarn verify:full
yarn pack:check

Stage meaning:

  • typecheck verifies provider and plugin contracts.
  • test:contracts verifies package metadata, legal files, npm payload intent, stream polling/ack behavior, handler failure behavior, and plugin registration errors.
  • test:unit verifies focused provider writes and plugin registration behavior.
  • build emits the publishable dist package.
  • pack:check builds and runs npm pack --dry-run so the payload can be reviewed before publish.

Production Notes

  • Your adapter owns Redis stream/group creation and any pending-message recovery behavior.
  • Set explicit consumerGroup and consumerName in multi-instance deployments.
  • Handler, deserialization, acknowledgement, and read-loop failures are reported through onError; failed messages are not acknowledged, and the polling loop continues.
  • If the onError hook itself throws, the provider keeps the stream consumer alive and ignores that hook failure.
  • Keep PubSubBus registered in the framework DI container before ApiRouter.register() so RedisStreamsPubSubPlugin can add the provider.
  • The npm package publishes compiled dist output plus README.md, LICENSE, and NOTICE; TypeScript source and tests stay out of the npm payload.