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

@fnndsc/cumin

v3.6.0

Published

Utility library for ChILI and other ChRIS-related JavaScript applications

Readme

  ____                _
 / ___|   _ ___  ____(_)_ __
| |  | | | | '_ \| '_ \| '_ \
| |__| |_| | | | | | | | | | |
 \____\__,_|_| |_|_| |_|_| |_|

Cumin Underpins Management Infrastructure Needs

cumin is the infrastructure and state management layer of the ChRIS interface ecosystem. It is a backend library that handles the "dirty work" of connecting to ChRIS, managing authentication tokens, and persisting user sessions.

Installation

npm install @fnndsc/cumin

Requires Node.js ≥ 20.12. Ships with TypeScript type definitions.

Usage

import { ChRISConnection, ChrisContext, ChrisIO } from "@fnndsc/cumin";

// The context engine remembers the active user, CUBE URL, and working directory
const context = new ChrisContext();
await context.init();
const cubeURL: string | null = await context.ChRISURL_get();

See Core Features for the full API surface.

Abstract

cumin abstracts the ChRIS REST API into a stateful, object-oriented environment. It is responsible for:

  1. Connection Management: Handling authentication, token storage, and client initialization.
  2. Context Persistence: Implementing the "Context" engine that remembers the active User, CUBE URL, and Working Directory.
  3. IO & Storage: Providing an abstraction (IStorageProvider) for filesystem access, enabling support for both Node.js (via fs) and other environments.

Role in the Ecosystem

In the "Sandwich Model" architecture, cumin is the bottom layer (just above the raw API client).

  • Consumers: Primarily salsa (logic) and chili (CLI state).
  • Environment: Designed for Node.js but architected with interfaces to support browser environments.

Core Features

  • ChrisContext: The state machine for multi-tenant, multi-backend sessions.
  • ChRISConnection: Wrapper for the low-level API client.
  • IStorageProvider: Abstraction interface for reading/writing config and data.
    • Includes readBinary for binary file uploads.
    • Includes recursive directory traversal helpers.
  • ChrisIO: High-level IO operations, including recursive directory uploading (uploadLocalPath).
  • ChRISResource.resources_getAll(): Generic pagination handler.
  • ListCache (listCache_get()): Session-scoped directory listing cache for the VFS.
  • ProcCache (procCache_get()): Session-scoped job monitoring cache. Stores all visible plugin instances as a DAG (two flat maps: instances keyed by ID, children/feedRoots for tree traversal). Structure is permanent once built; only non-terminal instance statuses are refreshed on read. Powers the /proc/feeds/ VFS provider in salsa.

Developer Setup

To build the cumin library from source:

  1. Install dependencies:

    npm install
  2. Compile:

    npm run build

License

MIT — part of the ChRIS Project.


-30-