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

@celerity-sdk/config

v0.8.3

Published

Configuration resolution, secret access, and platform detection for the Celerity Node SDK

Readme

@celerity-sdk/config

Configuration resolution, secret access, and platform detection for the Celerity Node SDK.

Provides a ConfigService that lazily fetches and caches configuration from pluggable backends (environment variables, AWS Secrets Manager, AWS Parameter Store, etc.) with optional schema validation via a Zod-compatible Schema<T> interface.

Installation

pnpm add @celerity-sdk/config

Quick Start — @Config(resourceName)

The @Config decorator injects a ConfigNamespace for a named celerity/config blueprint resource directly into your constructor:

# app.blueprint.yaml
resources:
  appConfig:
    type: "celerity/config"
    spec:
      name: appConfig
      plaintext: [APP_NAME, LOG_LEVEL, MAX_PAGE_SIZE]
import { Controller, Get, Public } from "@celerity-sdk/core";
import { Config, type ConfigNamespace } from "@celerity-sdk/config";

@Controller("/health")
export class HealthController {
  constructor(@Config("appConfig") private appConfig: ConfigNamespace) {}

  @Public()
  @Get()
  async check() {
    const appName = await this.appConfig.get("APP_NAME");
    return { status: "ok", appName: appName ?? "unknown" };
  }
}

ConfigNamespace API

| Method | Description | |--------|-------------| | get(key) | Returns the value for key, or undefined if not set | | getOrThrow(key) | Returns the value or throws if the key is missing | | getAll() | Returns all key-value pairs in the namespace | | parse(schema) | Fetches all values and validates with a Zod-compatible schema |

Schema validation

Use parse() to validate and type config values:

import { z } from "zod";

const schema = z.object({
  APP_NAME: z.string(),
  LOG_LEVEL: z.enum(["debug", "info", "warn", "error"]),
  MAX_PAGE_SIZE: z.coerce.number().int().positive(),
});

const config = await this.appConfig.parse(schema);
// config: { APP_NAME: string; LOG_LEVEL: "debug"|"info"|...; MAX_PAGE_SIZE: number }

Key Concepts

ConfigService (advanced)

For dynamic namespace access, inject the full ConfigService via @Inject("ConfigService"):

import { Inject } from "@celerity-sdk/core";
import type { ConfigService } from "@celerity-sdk/config";

class MultiConfigService {
  constructor(@Inject("ConfigService") private config: ConfigService) {}

  async getFromNamespace(ns: string, key: string) {
    return this.config.namespace(ns).get(key);
  }
}

ConfigLayer

A system layer that initialises the ConfigService once and registers it in the DI container. Also registers each discovered namespace under its own DI token so that @Config("name") resolves directly. Self-configures from environment variables (e.g. CELERITY_CONFIG_REFRESH_INTERVAL_MS).

Backends

| Backend | Description | |---|---| | EmptyConfigBackend | Returns empty config (default/testing) | | LocalConfigBackend | Reads from environment variables | | AwsSecretsManagerBackend | Fetches from AWS Secrets Manager | | AwsParameterStoreBackend | Fetches from AWS Systems Manager Parameter Store | | AwsLambdaExtensionBackend | Fetches via the Lambda secrets extension (skips refresh) |

Backend selection is automatic via resolveBackend() based on the CELERITY_CONFIG_BACKEND environment variable.

Cloud SDK Peer Dependencies

Cloud-specific backends require the corresponding SDK as an optional peer dependency:

  • AWS Secrets Manager: @aws-sdk/client-secrets-manager
  • AWS Parameter Store: @aws-sdk/client-ssm

Part of the Celerity Framework

See celerityframework.io for full documentation.