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

@console-one/process

v0.1.0

Published

Process framework: typed, event-emitting, subscribable long-running computations. Processes are addressable, controllable (pause/resume/cancel/seek), and compose via factories. Pairs with @console-one/multimap and @console-one/collections.

Readme

@console-one/process

Typed, event-emitting, subscribable long-running computations. Processes are addressable, controllable (pause / resume / cancel / seek), and compose via factories.

import {
  ProcessFactoryFactory,
  ProcessConstants,
} from '@console-one/process';

const factory = new ProcessFactoryFactory('my-namespace');

const proc = factory.fromMethod((state) => state.base + 1).exec({ input: { base: 41 } });

proc.subscribe(() => (payload) => {
  console.log('completed with', payload); // 42
  return true; // stop
}, ProcessConstants.Completed);

What you get

  • Process — the long-running computation. Emits typed events, supports subscribers with tag/predicate filters, tracks retention of past events for late subscribers.
  • ProcessFactory / ProcessFactoryFactory — build Process constructors from a plain method (fromMethod) or an async generator (fromGenerator).
  • Controller / DefaultController — owns process state, exposes hooks the process body calls to advance (completed, failed, error, signals).
  • ProcessEvent / ProcessConstants — the event vocabulary: Completed, Failed, Error, plus the terminal / consumer-activation sets.
  • Retention policyDefaultRetentionPolicy caps the replay buffer; late subscribers get the retained tail.

Install

npm install @console-one/process

Runtime deps:

  • @console-one/multimap — ListMultimap / SetMultimap for subscriber indexes
  • @console-one/collections — IndexMap for subscription bookkeeping

Smoke test

npm run smoke

Builds a factory, runs a method through it, subscribes to Completed, confirms the right value flows out.

Status and provenance

v0.1 — extracted from lens-desktop/src/shared/process/ with the accompanying address subsystem, ObjectStream, and a uuid helper vendored into src/vendor/ pending their own extractions (follow-up tasks).

Intentionally dropped

| Origin file | Why | |---|---| | types.ts | App-specific type definitions; consumers should bring their own or define at the call site | | agentConfig.ts | Agent-specific configuration that belongs in a downstream package |

Vendored

| Dep | Location | Future | |---|---|---| | ObjectAddress + address subsystem (10 files, ~774 LOC) | src/vendor/address/ | Promote to @console-one/address when a second consumer emerges | | ObjectStream + AbstractSubscribable | src/vendor/stream/ | Promote to @console-one/stream if needed | | uuid (2-line fn) | src/vendor/stringutil.ts | Keep vendored — too small to extract |

Substituted

| Origin import | Public package | |---|---| | ../multimap/set | @console-one/multimap | | ../indexmap | @console-one/collections |

License

MIT