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

@qrvey/enginex-resolvers

v0.0.1-1247-beta.1

Published

Builds connection definitions for `@qrvey/enginex` by reading the environment. The definition it returns is what you hand to `Enginex.create()` — which then exposes the read verbs (`query`, `count`, `storageExists`, `stream`, …). Depends on `@qrvey/engine

Downloads

62

Readme

@qrvey/enginex-resolvers

Builds connection definitions for @qrvey/enginex by reading the environment. The definition it returns is what you hand to Enginex.create() — which then exposes the read verbs (query, count, storageExists, stream, …). Depends on @qrvey/enginex; never the reverse.

Usage

import { Enginex } from '@qrvey/enginex';
import { fromDefaultStorage } from '@qrvey/enginex-resolvers';

const db = await Enginex.create(fromDefaultStorage()); // the configured default storage

Target a specific storage, or let the default resolve:

import { fromStorage, fromDefaultStorage } from '@qrvey/enginex-resolvers';

fromStorage({ engine: 'clickhouse' });
fromStorage({ engine: 'elasticsearch' });
fromStorage({ engine: 'opensearch' });
fromDefaultStorage({ autoConnect: true });

Internal env vars

fromStorage() / fromDefaultStorage() read engine-specific vars.

ClickHouse:

| Var | Meaning | Default | | --------------------- | ---------- | ------------ | | CLICKHOUSE_URL | server URL | required | | CLICKHOUSE_USER | username | default | | CLICKHOUSE_PASSWORD | password | (none) | | CLICKHOUSE_DATABASE | database | default |

Elasticsearch / OpenSearch — same shape under a ELASTICSEARCH_* or OPENSEARCH_* prefix:

| Var | Meaning | Default | | ------------------------ | ------------------------------------------ | ------------ | | <PREFIX>_HOST | node URL | required | | <PREFIX>_AUTH_USER | basic-auth username | (none) | | <PREFIX>_AUTH_PASSWORD | basic-auth password | (none) | | <PREFIX>_AUTH_TYPE | override: basic / aws_sigv4 / none | (inferred) | | AWS_DEFAULT_REGION | AWS SigV4 region (when no basic auth) | us-east-1 |

The resolver returns the auth strategy as config.auth: taken from <PREFIX>_AUTH_TYPE when set, otherwise inferred — basic when <PREFIX>_AUTH_USER/_AUTH_PASSWORD are present, else AWS SigV4. Set <PREFIX>_AUTH_TYPE=none for an unauthenticated (local) node.

Passing auth

Set the env for the mode you want; fromStorage({ engine }) puts it on config.auth, and the adapter builds the client accordingly:

# basic — inferred from user/pass (or set OPENSEARCH_AUTH_TYPE=basic)
OPENSEARCH_HOST=https://opensearch:9200
OPENSEARCH_AUTH_USER=app
OPENSEARCH_AUTH_PASSWORD=secret

# aws_sigv4 — inferred when no user/pass; region from AWS_DEFAULT_REGION
OPENSEARCH_HOST=https://my-domain.us-east-1.es.amazonaws.com
AWS_DEFAULT_REGION=us-east-1

# none — must be explicit (unauthenticated local node)
OPENSEARCH_HOST=http://localhost:9200
OPENSEARCH_AUTH_TYPE=none
// e.g. with the aws_sigv4 env above
const def = fromStorage({ engine: 'opensearch' });
// → { source: 'internal', engine: 'opensearch',
//     config: { url: '…', auth: 'aws_sigv4', region: 'us-east-1' }, … }

fromDefaultStorage() picks the default storage: DEFAULT_STORAGE when set, otherwise the single storage whose env vars are configured (it errors if none — or several — are configured). Each engine has its own prefix (CLICKHOUSE_*, ELASTICSEARCH_*, OPENSEARCH_*).

Add an internal engine

  1. Add src/env/read<Engine>Env.ts — read <ENGINE>_* and validate its required fields.
  2. Add one entry to INTERNAL_ENV_READERS in internalEngines.ts.