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

@x12i/memorix-catalog

v1.33.0

Published

Host-facing metadata facade for Memorix: descriptor catalog access with zero storage backend awareness (no Catalox, Firestore, or Mongo in host code).

Downloads

1,490

Readme

@x12i/memorix-catalog

The single host-facing surface for Memorix descriptor metadata. Open a catalog, read entity / list / item descriptors, done. The package owns every storage concern internally — hosts never reference Catalox, Mongo database names, or catalog bindings.

If you are a host app (e.g. @exellix/jobs-api) and you only need to know what entities/descriptors exist, this is the only Memorix metadata package you import.

Why

Descriptor metadata lives in Mongo-backed Catalox. @x12i/memorix-catalog keeps that decision internal. On open it probes whether descriptors exist for the app; if the store is empty it alerts — it does not migrate from Firestore or any other backend. Publish descriptors via seed apply or Catalox Manager.

Install

npm install @x12i/memorix-catalog

Usage

import { openMemorixCatalog } from "@x12i/memorix-catalog";

const catalog = await openMemorixCatalog();
// appId resolves from CATALOX_APP_ID → MEMORIX_APP_ID → "memorix"

const entities = await catalog.listEntities();
// [{ entityName: "assets", target: "entity", contentTypes: ["snapshots"], ... }, ...]

const assets = await catalog.getEntity("assets");
const list = await catalog.getListDescriptor("assets-main-list");
const item = await catalog.getItemDescriptor("asset-detail-item");

await catalog.close();

Guaranteeing readiness explicitly

openMemorixCatalog() already makes the catalog ready. If you want an explicit, idempotent check (e.g. a health probe), call ensureReady():

const readiness = await catalog.ensureReady();
// { ready: true, source: "mongo-existing" | "unavailable",
//   entityCount: 10, warnings: [] }

source is informational only — hosts never branch on storage details.

Alerts — never fail silently

The original regression this package fixes was a silent empty result. openMemorixCatalog never fails silently:

  • Database unreachable / not configured (missing MONGO_URI, connection error) → throws MemorixCatalogDbUnavailableError with a clear message.
  • Database reachable but empty (no descriptors) → alerts via console.warn by default. Configure with onMissingDescriptors:
// Fail hard if there are no descriptors:
await openMemorixCatalog({ onMissingDescriptors: "throw" });

// Route alerts to your own logger:
await openMemorixCatalog({ onAlert: (msg) => logger.warn(msg) });

| onMissingDescriptors | Behavior when DB is empty | |------------------------|---------------------------| | "warn" (default) | Loud console.warn (or onAlert), continues | | "throw" | Throws MemorixCatalogEmptyError | | "ignore" | Silent |

API

| Method | Returns | |--------|---------| | openMemorixCatalog(options?) | Promise<MemorixCatalog> | | catalog.appId | resolved app id | | catalog.ensureReady() | MemorixCatalogReadiness | | catalog.getSnapshot() | full MemorixCatalogSnapshot | | catalog.listEntities() | MemorixCatalogEntitySummary[] | | catalog.getEntity(name) | entity descriptor or null | | catalog.listListDescriptors() / getListDescriptor(id) | list descriptors | | catalog.listItemDescriptors() / getItemDescriptor(id) | item descriptors | | catalog.validate() | integrity report | | catalog.close() | releases the connection pool |

openMemorixCatalog(options)

| Option | Default | Purpose | |--------|---------|---------| | appId | CATALOX_APP_IDMEMORIX_APP_IDmemorix | Scope for descriptor lookups | | processEnv | process.env | Environment source | | skipProvision | false | Skip readiness probe side effects (tests only) |

Environment

| Var | Required | Purpose | |-----|----------|---------| | MONGO_URI | yes | Mongo cluster the metadata lives on (same one the host already uses) | | MEMORIX_CATALOX_DB | recommended | Name of the Catalox metadata database. If unset, the catalog uses the default memorix-catalox and warns — if your descriptors live in a different database, you must set this or lookups return nothing. (Alias: MEMORIX_DB_CATALOX.) | | CATALOX_APP_ID | yes | Scope (unchanged from prior Memorix usage) |

The most common misconfiguration is forgetting MEMORIX_CATALOX_DB. The catalog alerts on this at open time so it never fails silently.

GOOGLE_SERVICE_ACCOUNT_BASE64 is not required for Memorix Catalox. Keep it only where FuncX (or optional GCS) runs.

What this package deliberately hides

  • @x12i/catalox, @x12i/catalox/mongo
  • wireCataloxFromMongoStore, catalog bindings, god-mode scoping
  • Database-name selection internals

If you find yourself importing any of the above in a host app for metadata, you don't need to — use this package instead.