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

@apiquest/plugin-vault-file

v1.0.9

Published

File-based vault provider plugin for ApiQuest (JSON, readonly)

Readme

@apiquest/plugin-vault-file

File-based vault provider plugin for ApiQuest. Provides secure secret storage using encrypted or plain JSON files.

Installation

# Using npm
npm install -g @apiquest/plugin-vault-file

# Or using fracture CLI
fracture plugin install vault-file

Features

  • Read secrets from JSON files
  • AES-256-GCM encryption support
  • Environment variable integration for encryption keys
  • Read-only access (no write operations)
  • Secure key handling from environment variables

Usage

Configure the plugin in your collection's runtime options:

Plain JSON Vault

{
  "$schema": "https://apiquest.net/schemas/collection-v1.0.json",
  "protocol": "http",
  "options": {
    "plugins": {
      "vault:file": {
        "filePath": "./secrets.json"
      }
    }
  }
}

secrets.json:

{
  "apiKey": "sk_live_abc123",
  "dbPassword": "secret_password",
  "jwtSecret": "my_jwt_secret"
}

Encrypted Vault

For encrypted vaults, specify the encryption key from an environment variable:

{
  "options": {
    "plugins": {
      "vault:file": {
        "filePath": "./secrets.json.enc",
        "key": "VAULT_KEY",
        "source": "env"
      }
    }
  }
}

This reads the encryption key from process.env.VAULT_KEY.

Accessing Vault Secrets

Use the {{$vault:file:secretName}} syntax in your requests:

{
  "type": "request",
  "id": "api-call",
  "name": "API Call with Secret",
  "auth": {
    "type": "apikey",
    "apikey": {
      "key": "x-api-key",
      "value": "{{$vault:file:apiKey}}",
      "in": "header"
    }
  }
}

Using in Scripts

// preRequestScript
const dbPassword = await quest.vault.get('file', 'dbPassword');
quest.variables.set('password', dbPassword);

quest.test('Vault accessible', async () => {
  const secret = await quest.vault.get('file', 'apiKey');
  expect(secret).to.be.a('string');
});

Encryption

To create an encrypted vault file, use AES-256-GCM encryption with the following format:

{
  "_encrypted": "aes-256-gcm",
  "_iv": "base64_initialization_vector",
  "_authTag": "base64_authentication_tag",
  "_data": "base64_encrypted_data"
}

The plugin automatically detects encrypted files by the presence of the _encrypted field.

Security Best Practices

  1. Never commit unencrypted secrets to version control
  2. Store encryption keys in environment variables, not in code
  3. Use different vault files for different environments (dev, staging, prod)
  4. Rotate secrets regularly and update vault files
  5. Use encrypted vaults for sensitive production secrets

Compatibility

  • Protocols: Works with all plugins
  • Node.js: Requires Node.js 20+

Documentation

License

Dual-licensed under AGPL-3.0-or-later and commercial license. See LICENSE for details.