UNPKG

@puls-atlas/cli

Version:

The Puls Atlas CLI tool for managing Atlas projects

7 lines 367 B
import { SecretManagerServiceClient } from '@google-cloud/secret-manager'; export default (name, version = 'latest', project = 'puls-atlas-core') => { const client = new SecretManagerServiceClient(); return client.accessSecretVersion({ name: `projects/${project}/secrets/${name}/versions/${version}` }).then(([secret]) => secret.payload.data.toString()); };