{"_id":"dotenv-eval","_rev":"2-a89f9f3bc120ea35f36263be28b2b93f","name":"dotenv-eval","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"dotenv-eval","version":"0.1.0","description":"Add command substitution to dotenv","main":"lib/main.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["dotenv"],"author":{"name":"motdotla"},"license":"BSD-2-Clause","gitHead":"4d667fd124c66bc3147535adb8e1f4e931995be8","_id":"dotenv-eval@0.1.0","_nodeVersion":"14.17.3","_npmVersion":"7.18.1","dist":{"integrity":"sha512-3xlvrVMT/WsbdIvxDYkv7Bu56ZF+CIrMggqLJewiXHQT9KgcTChOFWXlIGiF8zMf/b35HL6YyRKTe+UBEPoA6g==","shasum":"983dfc56102961b31cfbe80211bd84abe11a9c92","tarball":"https://registry.npmjs.org/dotenv-eval/-/dotenv-eval-0.1.0.tgz","fileCount":3,"unpackedSize":683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBDFOCRA9TVsSAnZWagAA0EQP/0voSb0dkefNicWXmypt\nJqO54VIV5DTibyy/eEaw3fgw8u1j2rfuj/BHzdJlTmPIV5WBipB8OG2UBZ4P\nbo0qRszbgHWSTKV8ZnmJ6ajWRIth8KHiOoTdAx6bMrcVZi6WZUInPi/lIXAN\nvaSq/V9EB89Gt8IU0Gt2z42Kk8crH8vNLhOIBTv0Dn298vMai7e1P2PwBBOG\n8saib68a87dn341RDzENiv1KjyRuibKATo9Vwp0cACA3MKBIqWC4KSDwk4lN\nX39fMZRaaLzRserZI1ns9Te/D5bYqyVMAcX8rYCnDY/6aIvMxyPvLot7Z2CI\nMlS9cwXG3pMzzMnpBq8/TzfSvU1gNCB6+bO0ywvyNsvgJX1874CKKmLb534+\nPE5BEOl/9a96tXfXSMTItTsOVlhD7rkEJBqR2QLvXgI1dYtzQKbf7KQ4s8wy\n0Bu39BtkJ7a/KeEj8a1P1Bcm7RW/4bhncgvhrdQDetkzR7ZGgMZeABsZWJZA\n+BjPtVN/789C+Oqc8BklJyFjqDGnl301/P4i3DvH3BPW+QxTB6A8/NcfRWes\nlu4rSp3okBz8oJRhXqcmckb4S9X7f+IucvE77qrnCIgC7CFWPQ63RNeL/VCJ\nAGqw36/pasCmTO6P4X3hN6LKHhw/9l6Ei9uRBkXSFDu/hf5k/09YT8fByk/W\nv9CT\r\n=CpgT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsfOLv5zJxnRWcPY3P/YoaTrw5XO2F94SZ4tIM2hLLzAIhALzMY088V9X6OdDFd7ktvtwCtvx5+Ava3IbIScangpB0"}]},"_npmUser":{"name":"motdotla","email":"mot@mot.la"},"directories":{},"maintainers":[{"name":"motdotla","email":"mot@mot.la"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-eval_0.1.0_1644441934248_0.823397721371238"},"_hasShrinkwrap":false},"0.2.0":{"name":"dotenv-eval","version":"0.2.0","description":"Add command substitution to dotenv","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"require":"./lib/main.js","types":"./lib/main.d.ts","default":"./lib/main.js"},"./package.json":"./package.json"},"scripts":{"lint":"standard","test":"lab tests/* --coverage"},"keywords":["dotenv","command","substitution","variables","env",".env"],"repository":{"type":"git","url":"git+https://github.com/motdotla/dotenv-expand.git"},"author":{"name":"motdotla"},"license":"BSD-2-Clause","devDependencies":{"@types/node":"^17.0.8","dotenv":"^16.0.0","lab":"^14.3.4","should":"^11.2.1","standard":"^16.0.4","typescript":"^4.5.4"},"engines":{"node":">=12"},"gitHead":"e023cd491c23cab1a68613bfcb3caacfddd5939e","bugs":{"url":"https://github.com/motdotla/dotenv-expand/issues"},"homepage":"https://github.com/motdotla/dotenv-expand#readme","_id":"dotenv-eval@0.2.0","_nodeVersion":"14.17.3","_npmVersion":"7.18.1","dist":{"integrity":"sha512-8YGHV07AnDMoKqoCNsvfySb4DMhRZ4gduB9Ld4RYhNnL9nZ7FaYgu+X3KtFoIRKiQGP7mZ4NyUYQFLr5spdN4w==","shasum":"4f88e8501ff03dec4ab6fa83e23eeb023fc5922c","tarball":"https://registry.npmjs.org/dotenv-eval/-/dotenv-eval-0.2.0.tgz","fileCount":7,"unpackedSize":10307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBZoiCRA9TVsSAnZWagAAm2kP/R1BnuW9z8XUnN/phzZY\nIqVMRCZfxDA83g1eMiSyX9DeHSEO46Y8m4/3rwYje8ckOM1YQKHvj/dBHDgt\nLKzNY/LX1F6AgIYUrr8k1pRxO5oVrjIMZ1/DEQGn9+i9lAFnOpOS0/D0bit+\ndSLgjnLJrfYrxrcba2qecPzf2xgLhnYwR6aFZAOKkMCzzfxxfo27VHuy9BW9\ncN8jI58srnkz+n9CK0PkxwELzRL9WdrzBY5Rt/R+hcnuyRzb+IXj49F+zT0W\n8wLTmRPNHvaTouYi220xKSQwQu0KpUSYEKeBqGANGMUnKCHFvRfWEJ1kqQGG\nzICYUDMkJhEnDmaV5oLPaaVkGzeXEFV/pW3xJNTf1kjCPI+roiUsSRdcLDGQ\nuxBveuHKjuohsg2JTDc3gfP+wci9NXb8Tt7U8FKK8mlq8HAa9gWby0zv44v5\nBI2skWNIjDvR4v57UnPTmCUHavnz0ywh5NMjYMZclL7XGZ1neMKExKvxL4pu\nrBs/KGk9du4qD548WCO5VvuCBvj78axw3aqwb9Nh6M9ieca0niOQfUvMftL9\nf6cv7xaEpkwj0Fa6bkJPq2qdAYnShZZ4F4DY5uamO8I80PM72kn6nfsf0AGt\nmFrBORWvYsMSLf77+99nOJRsFLZVPcRMRKJnXAqm/4XnYKHfnw81xFg2N1Pi\nkvzV\r\n=3plp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAaU/wBvXssadu6ce2pk0iuxjGB2O5uU+VN+HKnOCmhSAiEAkp2ix6SSVDz/IDlPf1rIfnjcEzWnztgqCJx1Oot5kvw="}]},"_npmUser":{"name":"motdotla","email":"mot@mot.la"},"directories":{},"maintainers":[{"name":"motdotla","email":"mot@mot.la"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dotenv-eval_0.2.0_1644534306651_0.7907594841657861"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-09T21:25:34.248Z","0.1.0":"2022-02-09T21:25:34.376Z","modified":"2022-04-29T03:44:15.238Z","0.2.0":"2022-02-10T23:05:06.811Z"},"maintainers":[{"name":"motdotla","email":"mot@mot.la"}],"description":"Add command substitution to dotenv","keywords":["dotenv","command","substitution","variables","env",".env"],"author":{"name":"motdotla"},"license":"BSD-2-Clause","readme":"# dotenv-eval\n\n<img src=\"https://raw.githubusercontent.com/motdotla/dotenv-eval/master/dotenv-eval.png\" alt=\"dotenv-eval\" align=\"right\" />\n\nDotenv-eval adds command evaluation on top of \n[dotenv](http://github.com/motdotla/dotenv). If you find yourself needing to\nadd the output of a command in one of your environment variables, then\ndotenv-eval is your tool.\n\n## Install\n\n```bash\n# Install locally (recommended)\nnpm install dotenv-eval --save\n```\n\nOr installing with yarn? `yarn add dotenv-eval`\n\n## Usage\n\nCreate a `.env` file in the root of your project:\n\n```dosini\nGREETING=\"$(echo hello)\"\n```\n\nAs early as possible in your application, import and configure dotenv and then eval dotenv:\n\n```javascript\nvar dotenv = require('dotenv')\nvar dotenvEval = require('dotenv-eval')\n\nvar myEnv = dotenv.config()\ndotenvEval.eval(myEnv)\n\nconsole.log(process.env)\n```\n\nThat's it. `process.env` now has the evaluated (command substitution) values you defined in your `.env` file.\n\n## Documentation\n\nDotenvEval exposes one function:\n\n* eval\n\n### Eval\n\n`eval` will evaluate (command substitution) your environment variables.\n\n```js\nconst dotenv = {\n  parsed: {\n    BASIC_SUBSTITUTE: '$(echo hello)'\n  }\n}\n\nconst obj = dotenvEval.eval(dotenv)\n\nconsole.log(obj) // { BASIC_SUBSTITUTE: 'hello' }\n```\n\n#### Options\n\n##### ignoreProcessEnv\n\nDefault: `false`\n\nTurn off writing to `process.env`.\n\n```js\nconst dotenv = {\n  ignoreProcessEnv: true,\n  parsed: {\n    SHOULD_NOT_EXIST: 'testing'\n  }\n}\nconst obj = dotenvEval.eval(dotenv).parsed\n\nconsole.log(obj.SHOULD_NOT_EXIST) // testing\nconsole.log(process.env.SHOULD_NOT_EXIST) // undefined\n```\n\n## FAQ\n\n### What rules does the command substitution engine follow?\n\nThe substitution engine roughly has the following rules:\n\n* `$(command)` will substitute any command inside the `$(  )`\n* `\\$(command)` will escape the `$(command)` rather than substitute it\n\nYou can see a full list of examples [here](https://github.com/motdotla/dotenv-eval/blob/master/tests/.env).\n\n## CHANGELOG\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","readmeFilename":"README.md","homepage":"https://github.com/motdotla/dotenv-expand#readme","repository":{"type":"git","url":"git+https://github.com/motdotla/dotenv-expand.git"},"bugs":{"url":"https://github.com/motdotla/dotenv-expand/issues"}}