0.10.3 • Published 3 months ago

sops-decoder v0.10.3

Weekly downloads
722
License
MIT
Repository
github
Last release
3 months ago

SOPS Decoder for JavaScript (Node)

NPM Version NPM Downloads Build Status

This is a decoder for SOPS encoded files. This lightweight encoder makes it easy to embed in your AWS Lambda functions or Docker images without having to bring along the whole Go package.

Note: The decodeFile() method only supports JSON input.

Installation

npm install --save sops-decoder

Quick Start

    const sopsDecode = require('sops-decoder');

    try {
      const data = await sopsDecode.decodeFile('secure.enc.json');

      // do something with the data
      console.log(JSON.stringify(data, undefined, 2));
    } catch (err) {
      // Handle the error (SopsException)
      console.log(err);
    }

API

interface Tree {
  [key: string]: any;
}

//
// Take the given path as JSON and read the file contents and then call decode on the result
//
decodeFile(path: string): Promise<Tree>

//
// Run the given tree through the SOPS decoder and return a "plaintext" version of the
//   result
//
decode(tree: Tree): Promise<Tree>

TODO

  • Unit Testing
  • PGP Key support
  • GCP Support
  • Azure support
0.10.3

3 months ago

0.10.2

2 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago