0.2.0 • Published 10 months ago

@zerosecrets/zero v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
10 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.2.0

10 months ago

0.1.13

1 year ago

0.1.14

1 year ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago