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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@uns-kit/core

v1.0.21

Published

Core utilities and runtime building blocks for UNS-based realtime transformers.

Readme

@uns-kit/core

Core utilities and runtime building blocks for building Unified Namespace (UNS) realtime transformers. The package bundles the process lifecycle manager, MQTT integrations, gRPC gateway helpers, configuration tooling, and shared type definitions that power the UNS ecosystem.

Installation

pnpm add @uns-kit/core
# or
npm install @uns-kit/core

Key Features

  • UnsProxyProcess – plugin-ready runtime for managing UNS proxy instances and MQTT wiring.
  • MQTT helpers – resilient publishers, topic builders, throttled queues, and handover support.
  • Configuration utilities – Zod-powered config schema generation and secret resolution helpers.
  • gRPC gateway helpers – infrastructure to bridge Python workers into the UNS message fabric.
  • GraphQL tooling – utilities such as refresh-uns that rebuild UNS topic/tag unions from your environment.

Usage

Most projects start by creating an UnsProxyProcess and registering plugins:

import UnsProxyProcess from "@uns-kit/core/uns/uns-proxy-process";

const process = new UnsProxyProcess("mqtt-broker.svc:1883", { processName: "my-rtt" });

See the individual plugin packages (@uns-kit/cron, @uns-kit/api, @uns-kit/temporal) for examples on extending the process with runtime capabilities.

Refresh UNS topic/tag unions

The package ships a CLI tool that regenerates strongly-typed UNS topics and tags based on the live GraphQL schema:

pnpm run refresh-uns

When configured via uns-kit configure-codegen, this script lives in your project package.json and writes into src/uns/.

Generate UNS dictionary (object types & attributes with descriptions)

Use packages/uns-core/src/tools/generate-uns-dictionary.ts to turn a JSON dictionary into a TypeScript helper. No network or GraphQL calls are involved.

pnpm tsx packages/uns-core/src/tools/generate-uns-dictionary.ts \ 
  --input uns-dictionary.json \            # base JSON
  --output src/uns/uns-dictionary.generated.ts \ 
  --lang sl                                # pick language code from descriptions
  • Reads the provided JSON and emits TypeScript constants, description maps, and helper getters for IntelliSense and metadata emission.

To generate both dictionary and measurements in one step, use the wrapper:

pnpm tsx packages/uns-core/src/tools/generate-uns-reference.ts \
  --dictionary uns-dictionary.json \
  --dictionary-output src/uns/uns-dictionary.generated.ts \
  --measurements uns-measurements.json \
  --measurements-output src/uns/uns-measurements.generated.ts \
  --lang sl

Infisical secret resolution in development

  • The resolver looks for SecretResolverOptions.infisical.fetchSecret, then INFISICAL_TOKEN/INFISICAL_PERSONAL_TOKEN, then /run/secrets/infisical_token (or /var/lib/uns/secrets/infisical_token).
  • If no fetcher/token is available, the resolver now logs a warning and returns the placeholder default, or undefined when optional: true; required secrets still trigger onMissingSecret before throwing.
  • If Infisical is configured but the host is unreachable (e.g., DNS/network failure), the resolver warns and falls back to the same default/optional handling, reusing a cached value when present; required secrets throw with the original error message.
  • To inspect what would be used, call resolveInfisicalConfig() to get { token, projectId, siteUrl } via the same lookup rules.
  • Use this to run locally without Infisical: mark dev-only secrets as optional or give default values, and provide real tokens only in production.

Development

# Lint and type-check the sources
pnpm run typecheck

# Emit JavaScript and declaration files to dist/
pnpm run build

License

MIT © Aljoša Vister