0.3.3 • Published 8 months ago

@zerosecrets/zero v0.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

Zero TypeScript SDK

Typescript SDK for Zero. Provides a clear and simple interface for the secrets manager GraphQL API.

Installation

npm i @zerosecrets/zero

Usage

Fetch secrets for AWS by passing your zero token

import {zero} from '@zerosecrets/zero'

export async function main() {
  if (!process.env.ZERO_TOKEN) {
    throw new Error('Did you forget to set the ZERO_TOKEN environment variable?')
  }

  let result

  try {
    result = await zero({
      token: process.env.ZERO_TOKEN,
      pick: ['aws'],
      callerName: 'staging',
    }).fetch()
  } catch (error) {
    console.error(error)
  }

  console.log(result?.aws) // {secret: "value", secret2: "value2"}
}

main().catch(console.error)
0.3.0

8 months ago

0.3.2

8 months ago

0.3.1

8 months ago

0.3.3

8 months ago

0.2.1

8 months ago

0.2.0

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago