npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adra-network/env-ssm-env

v1.0.8

Published

ENV file parser to fetch SSM Parameters

Downloads

16

Readme

@adra-network/env-ssm-env

What is it

This little CLI parses an env file containing keys and SSM paths and constructs another env file with the fetched SSM Parameters

Decryption is taken care of if the path is encrypted

If a key in the ENV has a comma separated list of SSM paths, they will be decoded and join with a comma as the value for that key.

SOME_KEY=/ssm/path/1,/ssm/path/2

Will become

SOME_KEY=decoded-value-1,decoded-value-2

Installation

yarn add @adra-network/env-ssm-env
npm install @adra-network/env-ssm-env

Run it via npx

npx @adra-network/env-ssm-env [options]

Options

--ssm-path-prefix <string>

Prefixes the paths of your input env with the given string

Example --ssm-path-prefix "/dev"

Default : ""

--input-env <string>

Specifies the path of the env to parse

Example --input-env "./.env.example"

Default : ./.env.example

--docker-compatible <boolean>

Doesn't prefix the generate value with double quotes (")

See this for more information link

Example --docker-compatible

Default : false

--output-env <string>

Specifies the output path of the env to generate

Example --output-env "./.env"

Default : ./.env

--region <string>

Specifies the AWS Region to use

Example --region "eu-west-1"

Default :

process.env.AWS_REGION

then

process.env.AWS_DEFAULT_REGION

then

us-east-2

Examples

Considering a .env.example file looking like this:

KEY=/ssm/path/to/first-parameter
KEY2=/ssm/path/to/second-parameter

Running

npx @adra-network/env-ssm-env --ssm-path-prefix "/dev" --region "eu-west-1" --input-env ".env.example" --output-env ".env.production"

Would generate .env.production file with the following:

KEY=decypted-value-first-parameter
KEY2=decypted-value-second-parameter

Changelog

1.0.8

  • Implement the --docker-compatible flag
  • Add this changelog