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

@revopush/config-azure-keyvault

v0.3.0

Published

Azure Key Vault secret provider for @revopush/config.

Readme

@revopush/config-azure-keyvault

npm

An Azure Key Vault SecretSource for @revopush/config.

Install

npm i @revopush/config-azure-keyvault

@revopush/config is a peer dependency, so install it alongside if you haven't already.

Usage

import { createConfig, env, fileLayers } from "@revopush/config";
import { azureKeyVault } from "@revopush/config-azure-keyvault";

const config = createConfig({
  schemaDir: __dirname,
  sources: [fileLayers({ environment: process.env.ENVIRONMENT }), env()],
  secretSource: azureKeyVault(),
});
await config.init();

azureKeyVault() authenticates with DefaultAzureCredential — the standard Azure SDK credential chain (managed identity in Azure, az login locally, environment variables in CI). The Azure SDK itself (@azure/identity, @azure/keyvault-secrets) is imported lazily on first use, not at module load, so requiring this package costs nothing when no vault is configured.

Vault location

The vault is located from an environment variable, checked in this order:

  1. AZURE_KEYVAULT_URI — the full vault URI, e.g. https://my-vault.vault.azure.net.
  2. AZURE_KEYVAULT_ACCOUNT — the legacy shorthand, a bare vault name; the URI is built as https://<AZURE_KEYVAULT_ACCOUNT>.vault.azure.net.

If neither is set, azureKeyVault() resolves every secret to nothing rather than erroring — vault loading is simply disabled, and every declared secret falls back to its environment variable.

Pass { required: true } to make a missing vault location a hard failure: azureKeyVault({ required: true }) throws a ConfigError naming both environment variables as soon as a secret is declared and neither is set. Defaults to false, so local development without a vault is unaffected.

Required role

The identity DefaultAzureCredential resolves needs the Key Vault Secrets User role (or equivalent get/list permissions under the vault's access policy) on the target vault. Without it, every lookup fails with an authorization error, which — unlike a missing secret — is treated as an outage and stops startup; see the 404 rule below for why that distinction matters.

A secret the vault doesn't hold is treated as absent, not as a failure

A lookup that fails with HTTP 404 or Key Vault's SecretNotFound error code is not surfaced as an error: it is treated the same as the vault simply not holding that secret, so the key's environment variable stays in charge. This is deliberate — a service's secrets are not all required to live in the vault, and an optional one being absent is not, by itself, a sign of trouble.

Every other failure — a network error, an authorization failure, any other rejected request — does propagate, and stops config.init() from resolving. An unreachable vault is indistinguishable from an outage and must never be silently treated the same as "this one secret isn't here."

A vault entry that is empty or whitespace-only is also dropped, so it can't silently shadow a working environment variable with a blank value. Any other value — including one with meaningful surrounding whitespace — is stored exactly as returned, since some tokens rely on that whitespace.

License

MIT