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

@hapic/vault

v3.0.1

Published

A vault http api client.

Readme

@hapic/vault 🔒

npm version main Known Vulnerabilities Conventional Commits

This client provides a convenient way to interact with various endpoints in Vault, such as secrets, engines, and more. Vault is a popular open-source tool used for securely storing and accessing sensitive data, such as passwords, API keys, and certificates. The client offers a range of abstractions to simplify interactions with Vault and streamline the development process. Whether you are a seasoned developer or new to the world of secrets management, this API client is a powerful tool to help you get the most out of Vault.

Table of Contents

Documentation

To read the docs, visit https://hapic.tada5hi.net

Installation

npm install @hapic/vault --save

Usage

Config

To create a configuration for the VaultClient, a configuration must be specified, like described in the following:

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    request: {
        credentials: 'include',
    },
    conenctionOptions: {
        host: 'https://example.com/api/v1/',
        token: 'xxx',
    },
    // connectionString: 'xxx@https://example.com/v1/'
});

KeyValue V1

Create

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.keyValueV1.create(
    'engine',
    'path',
    {
        foo: 'bar'
    }
);

GetOne

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

const data = await client.keyValueV1.getOne(
    'engine',
    'path',
);
console.log(data);
// { data: { foo: 'bar' }, lease_duration: 0, ... }

Delete

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.keyValueV1.delete(
    'engine',
    'path',
);

KeyValue V2

Create

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.keyValueV2.create(
    'engine',
    'path',
    {
        data: {
            foo: 'bar'
        }
    }
);

GetOne

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

const data = await client.keyValueV2.getOne('engine', 'path');
console.log(data);
// { data: { data: { foo: 'bar' }, ... } }

Update

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.keyValueV2.create(
    'engine',
    'path',
    {
        data: {
            baz: 'boz'
        }
    }
);

Delete

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.keyValueV2.delete('engine','path');

Save

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.keyValueV2.save(
    'engine',
    'path',
    {
        data: {
            foo: 'bar'
        }
    }
);

Mount

Create

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.mount.create(
    'engine',
    {
        type: 'kv',
        generate_signing_key: true
    }
);

GetMany

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

const data = await client.mount.getMany();
console.log(data);
// {
//      data: {
//          'engine/': {
//              type: 'kv',
//              uuid: 'xxx',
//           }
//       },
//       lease_duration: 0,
//       ...
// }

GetOne

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

const data = await client.mount.getOne('engine');
console.log(data);
// { data: { type: 'kv', uuid: 'xxx' }, lease_duration: 0, ... }

Delete

import { VaultClient } from '@hapic/vault';

const client = new VaultClient({
    // ...
});

await client.mount.delete('engine');

License

Made with 💚

Published under MIT License.