GithubHelp home page GithubHelp logo

tkalfigo / dotenvenc Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 6.0 92 KB

Encrypt and decrypt your .env file so you can store sensitive information (passwords etc.) in source control

License: MIT License

JavaScript 100.00%

dotenvenc's People

Contributors

dependabot[bot] avatar okmttdhr avatar tkalfigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotenvenc's Issues

.env.enc not working on build apk

using react-native-dotenv and dotenvc. i have an encrypted .env.enc, it runs in the simulator, but it doesn't work when build on debug apk. how to make .env.enc run on debug / release apk

Pass custom path to dotenvenc?

This is a feature request, I suppose.

The core dotenv library lets you use a custom path for your .env, in case it's somewhere other than the app root. Could we get support for that in dotenvenc too?

I ask because I'm using Mocha to run tests which are stored in different directories. Each directory (or its parent) may have its own .env file. Your module does traverse parent folders starting from the folder it's executed from, which is awesome, but unfortunately that doesn't help when using Mocha since the execution directory is different to the test script's directory.

I'll try to illustrate it:

project_root/
    node_modules/
        mocha/
            bin/
                mocha
    folder1/
        .env
    folder2/
        .env
    folder3/
        subfolder1/
            example.js
            example.spec.js
        .env

I'd like to be able to encrypt that .env file inside folder3/ and decrypt it inside example.spec.js with require('dotenvenc')(process.env.DOTENVENC_KEY, __dirname). That would cause dotenvenc to start looking for .env.enc files located in subfolder1/, then start checking parent folders.

The current behaviour is that dotenvenc starts looking inside project_root/node_modules/mocha/bin/, since example.spec.js is being executed via Mocha. It scans parent folders until reaching project_root/ and then tells me to bugger off.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.