0.3.3 • Published 1 year ago

@zerosecrets/zero v0.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.3

1 year ago

0.2.1

1 year ago

0.2.0

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago