{"_id":"@nofrills/env","_rev":"51-300b57af41801ba553bfbc769f3dee63","name":"@nofrills/env","dist-tags":{"latest":"11.0.1","next":"11.0.1-next.1","canary":"4.0.1-canary.0"},"versions":{"1.0.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.0.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/types":"^3.3.0"},"devDependencies":{},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"0828ac6883e9793aeac7fe0f31e5a0d7969c2478","_id":"@nofrills/env@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-wWMvsbx5mwADWAqhfEe3FlrhUKutQksltEj9qmqfwePn6jXBlK3KJ+/jcoHEe+Wu6gJl41RC/Kq0Aobxt6vIZw==","shasum":"ab2c254e45c638109d01713a05dc261821f2da82","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.0.0.tgz","fileCount":5,"unpackedSize":5136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjLHCCRA9TVsSAnZWagAAB9gQAI18RCGMDn07IbbwasH2\njNt+ANLlmhF992okmTEVo9XNt3cnDZwKF56sj2q+i3lfTrAhcNk7QG+V+WV+\ni1l3IeTa2pIkE+weG/S1NE++lBxwSTM7Ownm8wgMyMZC7LvN9j1uWLFrtnwB\nDqfe3VVRGPaepjZ0lQcVNOEr8LcEwHFz5rvhSOX4shoQziRbfvQY2OrvUwgT\nvDsiKgs6d9UbCp58HZW3hQwGnKjpaVjeL8gpZPMngt5ejZHDH4qR9EiBTYSm\nGQ1T+zZFa2K5VELgjPNzlDtdJnGwBIFavs6hATs2SJhrUm5EZob01kUGNN/K\n47TGxUMGIHLPMJHQ380wz6t8mOZKlZbdl4GMH2e6Nc7XCjoh2mQ4D4wqlF5t\nrtS67KQht/oP9PSJDGG9AMP3JfB30ei74ihEaYfYcPxBY/CTkqcp4YKswd8x\nToysI9Y4QAyFoBeD/wfpWxlerL1ltms8RUJX/UUgxyUCEZlJKLNHmf6WFBJm\nB/1kJq06H6evYN1HDTsAi1a+K5HCR2hOBdjeEqO1BSOq0FRkOGa91E8g155r\nN0fTJyrLwTbKgknXer+GSWzHGb7/8Py3Z7ovq4ScGLQpRNhV1dcTbAnKSBVh\n0LKiv43RogNcfs+jFcVI5vGMokszYu0WRMKVyInkElEeidmu+T3lSLg4B8VV\nSP6E\r\n=wvxo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGv4si7smv+dr4gu2zGihkXZzxLIrQPBGyxV6h0jQfStAiABB/xlgSSZCXHopIFlLLX/CZyZi+eLhk70KQYOBIl/rw=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.0.0_1535947201969_0.39753075289877104"},"_hasShrinkwrap":false},"1.0.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.0.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/types":"^3.3.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"814587c403abeebe6200994328022d01d54794f5","_id":"@nofrills/env@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-OzUF6XdEMfsHcod2oY8PMo9/xKtNFicoqdBTGYI/b2PP6M1yZh73UvhWVRvHUrUeW3QSWgMqbYY83Yo2E8OmUQ==","shasum":"912c3c4f3c8c3d38460e1f9ba3b7e2bd9c69ef07","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.0.1.tgz","fileCount":5,"unpackedSize":6340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjNAoCRA9TVsSAnZWagAAoxEP/2mtv2zfS1D18dqDPpMJ\nL20WZtfnobAK6orw9YQ2qow6o7qiqtZNE/3SiJbotX2EHv39oa21V/Weibj6\ny6g7SiYbrx8n0urvj4S8Pb3F1cnJVkA2HEBkjg+tN1TxScT9FQerxJEonBZt\nWh6zDcOIaHajtVNd0SpWax4NLmZDo1NqLNHPZhND7I0k8GEOMo4D3N0vMpxN\nMAcYgqxSYCxQJx6W+vMQUNaKJ6chWbyYcvLPXb4PPKWzHZoxd8cR73kXmNwu\ni5XgaHPIjbcRPT3QJfNJmZIDumES1HKUiEra7KTdO8b0GiKp7rpBsRAsfD8K\nlMadLlaUZ8ynBQ1NCf10mW90oMx5CwUlIz6knx5e81cXR4yJ0KVgG9it/QFD\nL8M4gvtP+k18F+MW7GstPEYP2YcloBo6EffN1WV7icwCuY3JIiTpXqnSJ5xJ\nRUbPo4J1KoWVK+gAVuCij5PRfM9eC6qY6kROxwcKhQdJhT6sDx1eRYKJrH7J\ne3OCEX7rF2CZ3VLWCX+aM0u13P5XYZ6QJbGDonmNzs2V1iasFAJO5CmDsGUX\nQS3uYzfwWNNJp1NZLPB/FJyMKlRM2uMLIH1xRbmRNYYf2Kw85v4IEsw6Hl+6\nkrvoH0A+VaQYusEAjNeSeBKhJudQXQruUztVucsL0V9/k0tWotfV5iGbbuHg\nvAii\r\n=UFXG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXgdPOPrWq4buK0/2LjCwCeLu+EpPKZT3Z84Jj2RNh1AiAtBdJYoE7PeeCygOxWr4pil/xNjdDqe8A6sUfrh0DrHw=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.0.1_1535954983371_0.04506156175327458"},"_hasShrinkwrap":false},"1.0.2":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.0.2","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.6.1","@nofrills/types":"^3.3.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"c0a812b6bbac9adf4f11ea74d58f86c27b813f73","_id":"@nofrills/env@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-FOQA274zQ10rrFi1icndozhNUipviufaEJKy8XaEGlMvyZPenGykxu8MR/BJPFdMgAARcdSqPAmKZYd6E/dVIg==","shasum":"b80825d7ba9a58f041713d470e045599cdc38051","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.0.2.tgz","fileCount":5,"unpackedSize":7021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjfehCRA9TVsSAnZWagAA6y8QAI1Srueem02/BPg3BP/o\nTTXRFJ+xFuV0/vskkGwHtXQtU0jtFb5u/FtcusKfazgJryi2jVTL5Y/3Ay8M\ny+vx3Ksge93CKOSCxoFLQRq76cfR/DanirpKoneuuCGnQGRCrBKrqfeLeLOi\n8TXVCzNEbNYM9T94dKKnmWzUcclNVFFqie1erLHi8hRF7KWG8USbyqdlK39q\n1sbdoK1h8GzkNDtwvv/yGwz15K/p3p8OxOj30nnNeh5Nvn4MBLcw0/VPRevQ\nAm9IVwaDCVcfqnPQFe2o2Urnsk+nKUN4fva2WYqkm9DCS3F6exXj61M87sbS\nRn6yvlAbv8WQGznlRSr8gsGeuKKUogmp3ioOmvgSy4oJF/Ii5bu8zagks/sT\n9vSj3tpI+Fmy9zlmCqY8SNbc0x5bM2fKP81IBySrpcTTPuJ5Hnic6k4efZJa\nvC8ilmd/JeXWiMX07+cHeHEpUDeWIBgkGCqhqoL7FAn10vYg+nbANq9vCVgo\nKML4BeEobsV9AWEBZPUSJVDrfxRO5npFT3PRkkKE4TNyCGmE504erBw3n4RU\nABz6mGuhlDFHklPLoRL5wGp7G5ERpYsnbsNWrhIgqOFXp5bIxw42Z+a6GTck\n4AjMf8L9FA7Ap1uZbSujLy/tlZ2bX/hJWdugfS21cl3jh3WswQW3wxLhJ/lB\nXHBi\r\n=yoN0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw73zEz/LDv4Zr2Q+4KTc67gwLfa6x4hbzCeqaidHWlQIgXmbCLCYenpPbSnjHSyCNCLTctbsnBMcQQfj5qE7L8Mg="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.0.2_1536030624650_0.4619697819040387"},"_hasShrinkwrap":false},"1.0.3":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.0.3","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.6.1","@nofrills/types":"^3.3.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"cc85e6d0382a186176e5902d8ce98ad69095ff0b","_id":"@nofrills/env@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-S9mIpbGcohd6hEKvoMugOODtJMboP4Q+gH4vBuJVRUP1OL5VmWgeIHFA5YlcM7io3zFzJatzGTQ1Z6rn52E34A==","shasum":"cc3b01b472556194d03834b56ed343180513e981","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.0.3.tgz","fileCount":5,"unpackedSize":10839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjvp6CRA9TVsSAnZWagAAxHYP/iPW+ClweNJyYUcRgUC8\nl4T3KgEv2/WycPraUDCVO0NKOz49BYFZASKuQ3bQE0KVb/ORG9fkt0QBH8xJ\neyjtIZBszkWXT2hES9WPNt2AFRFLXzu8D3rzFxUP5KLrfdnmjEX3Cjd76/XA\nXpl1O3lfhlbvV4YIjoxcjcL8qTi9OWwRmi16yn05I9aEHpHZP5kmfHLMf7pZ\nhUaMFmrJ2gBigzsPSFDstCcgPdL92TW+oEqkBG/fdcIO2vT8H6KYmE2kLv+K\nBY0mSH2zyBXQ7Je4dRx+U0tmdPBknbR17dMImFDfnS1RFpk+dVKOumrl0Q7k\nH8oEeBhzmcCXukGd1xrNk3qXfiwrpDiWC6IS+KQ8qKp8gOCjL9+RHBaBau2q\ngX3tY45rnh7QQeWVj6EI+GqAt9Ui9am6XGRWdIoHj72VZFErC48z76AauL+h\nzdjyAPA0WWk+VSeZfCp1JwI7VF4H7IHHZ645fsx4CdYGUzf7GuquR79VCy3U\nojOnIC7zFtc5B94+i6325+IKavJtf3vCG49/ssew/D17RniTWE6vLv/Brh81\nzj9Z86S5mNnVbvIdTTevn8ZAPz0lSt4ZFbq16H3txVBgpu236VoD4WIWXOh/\nfFTUpZ2o8PHyU8Ax4kWvXwQDxceVkqldZhBNo3H54KqV7a8bnDLUO/VDPvXB\nSvoW\r\n=zJQh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJPEYvD0HDdMamHNqvHJBnwznrEfxeX5vxHl7A27kp7wIgKCYpwjzw7eIM6Qhw/BiL9VCtJMLtpyJeRh1TluG06C0="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.0.3_1536096889430_0.959153996033328"},"_hasShrinkwrap":false},"1.1.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.1.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.6.1","@nofrills/types":"^3.3.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"768349c585e58587310ba1d041999edac9f66f27","_id":"@nofrills/env@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-GeRtBOlOubnKzCtlw+uAONeSU6eYOc8w6IbQXYHLY24DdwDmFkYrU4cfrYwQcMnafE5DjDPcBRKXevZ8FGzsEA==","shasum":"d12d8c0033a2084a6a12f6a6226c1ba7b81dc69c","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.1.0.tgz","fileCount":5,"unpackedSize":11975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjw1bCRA9TVsSAnZWagAAPLMP/092Pnb17Tce5fcDDOHn\n6Vs88SXtSWbGvZO+n2fB3WN0j35ISNvzBk29ia0JJGadUcUTvOkW3i/gDkvy\nFGmPF5iZkjEBBJnSX397nnv75hX+qkdGMXHD8m8FjTtRKXQLamMGw0+UmWn+\nj7WOl4m7l+n1aq/6ax7r3dRnVziOyFFAmEGTnKhF4EhdEeJIFDjn4xBuJfXN\nTXGK8FSp1Bt5P+TRRN8HUNoY3QrkNXcIjVaGI7ZgpU0arnvXArh0jE/+w2vH\n8CPfmxl6UKbxqfZ9RZZWGEI40HrEZfTfGDAJOcZsgJIY/aS+U0WYpVXpF0E3\noknUB82G1EsIlldjKh0jUvTzkmIMHzIIRH8Kypk4PXbVg5UzKmn7T6vJp0rq\noeB9kwZbRDXPf1+YHa4T9MdCZ/137FMJBxC2fWrbCFRFpSxfj4xMXhmp/SSh\nBRmCpAbPLcr1IB2v3tyT7YR4z0LfwGJxDpGlTy67hWVV0UDATk94tn4v/Ssu\npeJNKOOnBvQy9PZOdvSfaOaqAsSSLAE5l8VpUB6DRrokGMdWe74CBwtARUM0\nvOwUkuwxzFJAgis/IAVFAB1LJBoFiyq2LcarablGXAS4Ss5dETgWmi1uc0bD\n1y+GqA/joyGlzl32cfCROpxbrRlu2CRNYWTG36kvSNAqhMbrSVcIgveyxP99\niOxN\r\n=NRwJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbTHY1Tj+2yVwFzclreTeOuQ1i0EOQl9lHHQFZL1nPfAiAoWMyhVc7grmd7myTqYS6gXzky78i3TKGndkkcpqpRDw=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.1.0_1536101722710_0.23124897699317337"},"_hasShrinkwrap":false},"1.2.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.2.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.6.1","@nofrills/types":"^3.3.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"1ae8f18ccf3106b699580002b5c22564f167fca2","_id":"@nofrills/env@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-ExA6Ce3A285EtCgFFyJ3XqWsMOrkdNNyWZfUm6PcYo3vIQMovXjlQVaYqXRw5bLlYtiocd0zB4kiPn7TkGCy7g==","shasum":"c3e3e651692fac7c4adf4488318f751ee368fecd","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.2.0.tgz","fileCount":5,"unpackedSize":12128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblpMqCRA9TVsSAnZWagAAnTcP/0QM57X8L7jdRhEjogfQ\nv+ADHfr4QPhpVgXK87L6f+UZbKspisdoVCSqkiT86Vjr0fBpPzbchPS5plH5\n6LNFR64KAaOyBg4EGIDWiriAiIGkcU/vrLp0tLFLpK5Uo2zUKmwPSdDNqdhp\nCIAnOR7o72ewS2HyH53+RREz3s9xU3eIbr/zKQwVbm7bgZRyLNQFK2VpMtKF\nd2NXxKtgpB0J+g7h7oTamxc1bGAfpJwIW1qphO1ouCWWfy936AeduUwIxF1z\n7OQ/ZBNu+C0KLBwKJhjvNCuAnwJFyI+6exstF507fH51pJH+BV0oOa5Fq4eD\n5X4p4DPP2llr1P5QEZdSRe4hy0iHx6UV6JcbdNcWZAgjsBSxM9XiWlXQ7v4j\nsmvNDDlG6eXKH/hPaFi08CDbzNqdHJTassOirEdAFoJCBFyCEJMvtylV+nL6\n9A/tv47vb+vJ/NpgV/h+Jp3Y8FzBIxZ0r2p+2P1nBK5r0ww8W6PLhm3M7Sae\nu5XRY8zgIP15N6vfe48kgPf1FxeIhiXCJkl061AJvQQeLy2vN/jkcW0txmuW\nGMinM5HApdDwWrCusHm/9oU/UCo5Dj1bFSALM/vnIsVLtP0Ry35SSEVM7CHC\nPM+xD6P8lNGoaJ+lnnbiJ4Oa6NFcMAcIuEYZf3B0X1CboJI4lvyBONe/aslP\ng1r+\r\n=ZpPD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3a6H/mH5qnt/CbtbALggEr2rg5weei+JgahA15gfkLQIgL9fm9p32wWhJMMGv92RsHC1OzyrHT3o7/WBYGof2KL8="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.2.0_1536594729334_0.5829870648451763"},"_hasShrinkwrap":false},"1.3.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.3.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.6.1","@nofrills/types":"^3.3.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"bf8518ad2720b27441bec58b0d2b351553d55dc8","_id":"@nofrills/env@1.3.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-4cDqBNRXs762ZhuNPx2KOul8T3m0eTI7sLj2djKyDPaPh2DadYY8VJIc160IhwE6ldooFht1OlFd8TKJOn1ziA==","shasum":"a8f73e060aaec31900f36bc1ba3e8b2a5fc13fd0","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.3.0.tgz","fileCount":5,"unpackedSize":12128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmdXSCRA9TVsSAnZWagAAl98P/2JE9/orUZ6V5px8Mnj6\n8lyMXJZ7kg0DQmY+20jAA4sjfezKUoFT979I0pA/uUp+0ZpAF/A1OH84DxeU\nbGuKi7UaYVBvHyHz/JAXr6DJmNd7lAZ4lDXHIkqQnfnWHr5AmmkCt9Kvbo8M\nRFOsjiaphHzZuGucJCWdLux8Uph7G0ra0VBMb9DW1u43lTRMUtWxqwEkNUaV\n4Bn1pzn5FzoFNZ2bpJ0+Lz0bsKSzVtTaDhxhd3HWo1pfU8nnS8Aiygd/fDE9\n8dLmgGzNH3eZudQ+7qy96wpwztM+Oz19XEv2mieW9NOZcAGuTPDZrW5k/kj0\nuYuZzcvON4SNNUijPFWYM7HOXPvBkvb67iAX0cCKZGYJWSAUl5hjbcNlX1zK\nlK3pzijJr0+LdMdr7jnLXXf2SCtZT2Ym7ue1s5hbYfIMKxLpl55tm0Cbhj8U\nR/QnZ4E7xGJMj0dULZGt6bGFWhCLk9QOw4y1PU0kjZmIcqPgfhed0ZVYB6tv\nwAGK0JT15cD8cHfINszs04X+FE3MNeKmqw8wKHLIypFgSjlUhYYEUi1iAZjo\n6xhEdNMSBnc2VOsMA/p3c+kxvwaVnau5w73+n4rj3N7GJL0h3LNqTf5pXLPm\nPLBulr00q/4ObuiW3nJizhYGP6QDD8krw+fm3PavUb8PElI6qAlbSQR3Uzmz\nTGVz\r\n=Yh4l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4gOZEmbvQ0ACgnRBNM7AcuuqOXpcJcuRJAtSpxJOA3AiEA3IZC0tcK2uHilm6doAxOYjdWLdqo1xTdLxjiAdxJzrU="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.3.0_1536808401687_0.4534979732339435"},"_hasShrinkwrap":false},"1.3.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/packages/env/#readme","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.3.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.8.0","@nofrills/types":"^3.4.1","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"85605953a192aeaefadad546607cebebf22bb58f","_id":"@nofrills/env@1.3.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-KQS44475u6x/AZ9P9qVTs1PeKUJsIchpUKAKnAJkq+V34Ho+OhNsEJDwjHv9mEnw9B9f2bLtTtN9b1vVtRRsFg==","shasum":"6c7c259ebe6acdbe7f744e10f828107d693d6fdc","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.3.1.tgz","fileCount":5,"unpackedSize":12128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpnmqCRA9TVsSAnZWagAANDwP/AwrJBi+Nqj6mSxmPkKC\ntKU8KR+RrF7H8/agAg7TF1hPRNtUemRmNBA4CWoFYNPdtIVoL0Z1MDUBrWFH\nP6MAqUxKaIEn99L4oK2Gu1wu0/Wgzcx8HKSEi9/Rur0yxxL3Lv29pR6BL8fa\nH2z2uKWtwImDel0nFbRr1ENlewVDprJHooSUpcba+RAf48dCKVQ6YYeHpPQW\nHgQmH0DT4gZoXzhYyE5l5tVnSdmOasBif4CckDDehJYrKE5/FAk13juy8pGO\nZL2nAlsxmfNKbewcOLScwRN80vt9MxKgBdww18KPCDCSke82hSQKmXUMm8Pc\nDm3K3GkV645p5eKQ3F1GutFwTJj4djm4KLmCAYqOfVwZgNC5c5+vEPMBy/yR\nYPCcw2NaG8OplWyw3pigGTsZ+gZbd/a+5rxbkETUi9e7yMNqgStXN9y3+0lF\n1f+q+7z/GqIax75caF9HI9ysti0VQOP+Qp6A4Wf2X0SNUsrXMc+fxfLgK2tG\nALls5YgXQScWTcSNvFYq7zTfz3UgcbP4qlybudXYjGG7Xa4wugsu8UR5tykk\nboUet2S/ffsXWRp6R+/peIRCf1pS2/ZS228Y6A17e49qgyeDWN5UEQX0kU+a\npJCIhnfv4hwjil/zLRAQLdbm3FFFAuheB3w1RJs/UJ0DIf/RF7shzNi6UT7N\ngoZM\r\n=O193\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWLUyTap75NICnXOuiRsmnzGBhF8cPsX3/72aknmHCmwIgURTEhQhFemYUREvbFp0feRZo2RHm2sOxsavUrTH5Bls="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.3.1_1537636778226_0.01884122344851158"},"_hasShrinkwrap":false},"1.3.2":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.3.2","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.8.0","@nofrills/types":"^3.4.1","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"68611ba55f5c863885a02861801c6d2ff31cad0a","_id":"@nofrills/env@1.3.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-R72w+CYrevHe5YHJieaIJZaTk8CnyfE57ZGYp4VPdehJGEjG+xQQ/1IfTkaCF8r9/911mn+OGuEW8XSxgRGqmg==","shasum":"785a3b896f2e1aeb09fcd3062f053f0d2608d859","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.3.2.tgz","fileCount":5,"unpackedSize":12116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpw4YCRA9TVsSAnZWagAAc2cP/1x7W7RLq4Feza7IgXBZ\nNv5kkek+2uHjsZaQnHxIaOD5U+opFH7jgDCBrMNWvQp/kRGlYA/DJXzpHQx7\nwECrafHvIODEKzpjUn+tUDlkJDU/xfRgEodKwQQ/mMjxgrSmg3fYRGRozknr\nu5fuPVoLAA3Jwyq4HDBqD5Gao6CfoqcWID7YFo3ARiLZS/d27LfmR2r7NFQX\nso3tyEoWwdSevrUSwVyY1tLSnNn53H7rClMi2eHEX1eVHzHDnRydfXmKWwot\na7MHBOL1N5vESPufFvJB8SULl8VohiJT+wj6RXaa7EhwyNpYUCmLj89mPch0\n6uoVJbatYFm0aqKTknZYBDwpipKeRqoWBY/2LVt96Xmx1/ATqSdCShMUNtAQ\nW1mOi/Sh+5Oji4DIbsZq7CbF5PdnJI8mrKdfWnQkTFAeneIYzzm7QF2UFfTO\njEGlZ2C5QICc+jZoeau57ZRcuUSXkX3bQEF4JOrwOoU2KSc2wazNpKggLLXG\n+7GRLbt2bPTPffbNQP7cc5K253qH6hf6So07RjPQrYaDzhzlyi9zqY3nrYas\nPLvQmpg61wMmRmjJQw4JVAQ9c2EJyUJL7aoV6UqdmOOZn7nq9idZ88XvObYS\nCQDDpqe20kddQ+Xo3KLHh05Dj5FM5DIgwxNu1XQA6v4ky8X3jGXCodfGROtn\nFpOo\r\n=iCds\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCffVYoibt9GJIAnQnqVcX+QunmaRB7/n6UaTU4RxeHrAIhAIiCa7TSHu0/pHjctlS+I9mr7Wgf/1sGOBkh9aa183sq"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.3.2_1537674775465_0.31714932915205774"},"_hasShrinkwrap":false},"1.3.3":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.3.3","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.8.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"34c5e3fda6f940d49354e281960a3dac171374cd","_id":"@nofrills/env@1.3.3","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-48f25TTYvA1OIvdZGmTeJ0rTm0WfJ0nbPeJb0oWh9zAeWpEfzDDsdMlCT4SITBk90oW8ILWjBnBCszXIoJ6wig==","shasum":"0a110c13bb2cfe718aff543ebd0384b36500d62d","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.3.3.tgz","fileCount":5,"unpackedSize":12083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqAu/CRA9TVsSAnZWagAAvjgP/1ed1Mm3ubv0s01Efwct\n4VnqA1MWT0oywM3Hq3QGhZwBbh+SoIGKPCg6nd8Lvtr/tu0SJ58eWUZaduWV\nY4eUTgey4hP6jl0gluBvA4zJe6bxZ6cDyL7jQr8gx0tDQdSofdU3ta/yY0i3\nciyTeO4y28NtrZ3X/gG82165RSiv5Sl51q23AMS/AqT9ugaXQ/Q+xY7RnqQk\n1EIaD8K2CivA6/vhBVi+E4umkO417PgOZYK0+PFXLAB8rU9Owh1jkPfEqhcC\nxDm7UvDzvKOM5iijW2xBElwYKUC8pw6U2O0IMG9WZPQK/6u7lIOQ+u8bv23N\nyKzSytAN8vvMzVoWiRLJy39G/5UlfNJ63ILzjHJ9N3dCsG3iNijVOeyCTcMr\nJnFpe8m96wgI4+e7q2iun05HOU13aDtxzs0JnXhwWY3OfGgovR8KkeJKwST/\n2AQ63zOaKPU0N5ab5iR/YCMovkeovpjnl9f57LPjn5lD5FcPPFEkX0Mopns2\nx20Q//H6bq2apGl9MmaOUMgg6Hb6Jq36tzWEi0I8BZpUkQb3fd3J6NnBAiLg\nqsEMsPccCiSSJkGMUatcSi/C7pZRhvYH/WHbizC2MJqJT7XBH61oh0hQhQaI\nDr/D6Y8eOeiALjP4PB/MaWxdorldM+ojbosiyZ4RJHLsW1hgQETB4yssOB7c\n04Vu\r\n=FWQi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCQfVpHcPaX1V8r2PXNAXm3Idkta8YTfu38JbMa5jyWAIhAPUxia7S0WnGA/zrbFmVnlnh/2206Xx3uhPHbmJ/BCXx"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.3.3_1537739710935_0.20632225568229012"},"_hasShrinkwrap":false},"1.3.4":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.3.4","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.8.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"tsc --project tsconfig.build.json","prebuild":"yarn run clean","clean":"rimraf .cache && rimraf docs && rimraf lib"},"gitHead":"4c0ab8fd44a98b6ac477fc740d7d44e5127ad40e","_id":"@nofrills/env@1.3.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-fCzalqJIBm4qteaqAxNKr0/0tIArr64bFxRF2qKu+6WxsnWwuGAnjlnjXa14O6SdnzyTBwmEEcm5x6wuSGuQyA==","shasum":"81b5a79acef411228a0edb9b31ae4589890808cb","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.3.4.tgz","fileCount":5,"unpackedSize":12083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqCvoCRA9TVsSAnZWagAAre0P/2nExQQm3HyJDaSmRiGq\nk1CH0nxBsKhrvEhCRsAj5iUK5Vc0uXR8O/TbHnA5b1lowEQAh/swMAmpz/vI\nBA/qzU6gV3ZZP+jDJWe4FBF7PYVV8FIEMKhNIoA46N6q8Nv2ERtxyPcaLqOv\n55mJ1qUyKEXh4zyE0DYgF0HLfVYi7/Crs+UpiTlmb10iJhsdUtoW/igFSdN4\nsqo03lQzpbKiXVvg6MmbpFDEIfCbkRACGWdK3RSA2DgjRx8IO+5M5nHkgpLy\nmpWjtTDvT+2CqfABg0A/mxBqvkYYqz/vcH0fxRww3sAaOpmfs1O7B5OMk5vM\nDeHWOSij0EUc0q/y5Sf2yaUWC4S6Pa65JrbrMJUxqjwjnBfJJXGSNOrFfD3X\nVolWLfBHcfjD9fUU2Y8eAzeHfEUZQMFhfl59tDDLmOSQPH8plalFjy3qVwD3\nK+OliCcIuM+NnurWA33lpkeQeJnRD7zAV9JDU/RT4r/+YgGndLHJYus8/3w2\nEpmI4vLnR6AG2oUTevKRo01/U8d/cdqqQfajSLUfKR7NV4ATVyFZBWdXZOnl\nYB3tW7xIjZsqOv/w442FI9/2xbuTocJnlD+ONsLVlKOrYRoJR3t+hCEPUvna\nDzEQCfEs6n5XfqHMtGIgnOK3rhnqpS1tmhI8fNUk+iGFUXBXmQ3+r9qLN9JF\nmf6J\r\n=c9eL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+keteKxnR9X7jsWvlZ+pFJWnnWwZon8N+UfmQCDzGcAiEA03H3I8PzyRxHSYfzgxz/7ZEzVK28wHxFAcmyj9hbvok="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.3.4_1537747943569_0.1460085101980666"},"_hasShrinkwrap":false},"1.3.5":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.3.5","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.8.0","deepmerge":"^2.1.1"},"devDependencies":{"@types/deepmerge":"^2.1.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","clean":"cli-tasks clean"},"gitHead":"02b48a0c23e326f655b47c2e61a4dbbcc71e4670","_id":"@nofrills/env@1.3.5","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-71uqa1xa9n81xOkDxyV967z/g2XkXf8CXk1SHtugNBJy448+oznIu54SlIG7kEdYwrGQClXRjG4V9EFLfgzAow==","shasum":"e3c344af79cf932bac8f0ce69f6e8ebb804a57b1","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.3.5.tgz","fileCount":6,"unpackedSize":12146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqEcqCRA9TVsSAnZWagAAeycP+wYFXT1ugk5C0/2lKeCa\nkCDOEQ/4BpshnK6Pj7q8eV7mmEEBtDxvrUyOWzzV3VXzcu4a1xfQUPi7lTyp\nPb4JQrHmjcTgpyiq1D+sDospLGDSgJD7xZIdiBQeCHRomCvHiALF3I5PGIoI\n1fx5yU4Pzb9KIE0L/LxPeKJdK4a0BJvDidiQW3npk4RExIMQVDRsqOybYxlY\npo+6mcnyoDT7EYSjmS2/VeWk7pyO0t66yCWzxxP+hPzQiJIjm0BYKyITm08B\nsKs77my7hAnUmCyc9z4Y90bg0rLhRE6M+FFOi9Q1bKwxxLUqVZU6y4eqTor+\n6SH36VY+JYYstoKVhj4jFCHwWp288jRENIeek3dUwFpxeccjD1fyLQYwScY3\neSDP1xYwhWnGUwsFcPc6DfUtIp768Q1aaaSI2xXlW/FVR3Yyr586bb0gajUJ\nXXyKL/j6V5udyIxt4jmtmND+qnC6QMLhViFE+qvuyHzU5o1CrNtPhrMk5IJ4\n+YjHaDzmVhH6vQ2c07IUvPiNpWCCnzYVOo6AwEHYLP/uIejDfV6ngNQ0zNLJ\n2PF9CT2+LSRF8cGgUph0NarcfTnG/SSUwK3R2fCk4XnVmRfFBjzsOmAgrdBv\nEgsRRrb5FB1EI3UxGHUOi14xA0GhxuNNzM0VznAtyQUMC3JgBaPFSaWZmOuj\nOFEa\r\n=74Yi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLgg1rOWmlgbAPeW8FMbtaE9znC1YMCTZ81scHYmbxfQIgK20flu8tHv7TlDf3ADH3uKJwePvtIHirZrA/aqDl4gE="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.3.5_1537754919090_0.16777628338438122"},"_hasShrinkwrap":false},"1.4.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","license":"MIT","main":"./lib/env.js","name":"@nofrills/env","private":false,"types":"./lib/env.d.ts","version":"1.4.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^3.8.0","deepmerge":"^2.2.1"},"devDependencies":{"@types/deepmerge":"^2.2.0"},"publishConfig":{"access":"public","tag":"latest"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","clean":"cli-tasks clean"},"gitHead":"fe98f627b3b697e95b1e9dddb38a0c226e7d084a","_id":"@nofrills/env@1.4.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"dist":{"integrity":"sha512-vZuV9YvIw0p+jvMRaTmPTElBWiV/L/Km7aGZ7Ho6PY5ooislHq7OVzt5i7GV3CKfh/xadldGfbuhmHFfzhLqjQ==","shasum":"305915461d0c5a6d0535245435804588ba9e8dc6","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.4.0.tgz","fileCount":6,"unpackedSize":12146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvCwcCRA9TVsSAnZWagAALnwP/0+FfaJeLVCuswwxtqKT\n3l/eu1x19QBXP+QAzRzw81kEQohVAjWmC3tv+Ql5bw7pSh7x+7a/xazVUAoA\nNcOXHONLx/Yfj8NVc5DIvhh9QfXM/m2wVG/d9aEbkKDwShDwnPJVgUP4tHNy\ncuv6SbW9An2dR0yO+tp8rmTt1CXTWaF3XCy81C33jo6omlBhcl7Na9PokTmb\naNy5voUjp8ojZnA8GtbRv3F0zx4cVQF5/VCFvfUIr9n342sIhjWj/R4zP5af\nO68HO5f2+sTrAYvj71G48IErZjSWq0BKjxK9Cm2VIIETfCiPABM3hv6Xi9ND\n6Qi/8EYKMnlNUypMwbzAeoTYk+7GNSXTKUKHeS8zszxM2SyXmpvFJQxZfK3M\nhMgxF18pYFNSL/o2+4VolTAs7t9KDEj7EU/7BZ1Tvr2mf1OlkzIwnjahsgEb\nvjhD5tYB5ty8fEKUsXueWBwagUmX2AZkt4GjM/fyeTYBjZ6/TkCPsn9dikBv\nr16IX/jvzI91DTIp2+7CqRIA81QfJfOCvHBhmGOoedSo5qW9TDsxzsQbDqHW\nUJ455PSdpAf0hBubo8zobHVT/Gy3UrT5fvv/uAExd990hdj4ixxHt9DLa9F0\n1Kmk3X4azZXdflJFLzYuNa8mNqQD9aZXr/h4z7BoDdl1wKMMhqaj4D25rnub\nCeFz\r\n=+POh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEzyvA34qMu1d17r8KEdVxk+l64WXU3MBd0twpk9mUeVAiBSIcSUd2jQkM3ZdXdi1p3vuuCf+5kTXiAv88mjw6VIYQ=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.4.0_1539058715487_0.5637740109666232"},"_hasShrinkwrap":false},"1.4.3":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"1.4.3","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^3.8.3","@nofrills/types":"^3.5.3","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"52db1b420e4fa8749db59c41060795d4318584e8","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@1.4.3","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-ngtvomTr59xmSno58jbAe3Oi9TpLU/hBDM75Bv4wmlhQ2qPTu58H9lSec9Fib+32LKY7e9HIvgV8u6oznBFRJw==","shasum":"aeabdc6bd8cb142c852227f8612bd45e3a05f50a","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.4.3.tgz","fileCount":8,"unpackedSize":118920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDn6gCRA9TVsSAnZWagAA0fUP/jkVxmC3MZTrASDXa3Dv\nDBrwQbjcwWMd/KsKTupr4W1oEH3mR0wnkl3O9nFCe028HwXt+hxvqD6Zhmma\nlbSa35iUmVozKrABJKTrlBW7XYCPhvJp9njz33sTQBYD6WJCbP7z/Vv6HwsV\nprZ1xwafcRZzStu1Fu9st3DMx6+GN0OuYCan4uzP2u8AXxm65JeB9R5A4/I4\ng6Jf5R/zTHXVUg9LvDqgTctPBnuKZDNQedQKDEXAjcgzxK2vpyv8xj4EStos\nfw98QMQK+x2CUgEYwslkF/cBj9+75h7Lg8Pyvg7yl+EpnwyA88TyGnGCuWaj\ng+6G4kmDvXruiqwbzBSMKT6f2kLl4GS3NLtMUUbQhzigo9L1KREAIUnthcyJ\ndA49Gql2JOUUAjlLtsF1IZuWxO9d1m15+RBSKKq746Erim5kcMQfeNX2hnOh\n+bngTAFPjSdifobBYPtkwVEZSDW6hjyOCURGgHpZjIF42IGazXJENG0hZ87U\nWj/WocLI7nWUpXRKJHyc9/BK3AzTlmB4dhrDV5KOQ18bSb1ENo89r0BRBlUX\nyVZORRfFMXFBvNi4dO8Ba3XuE43fzJGZZFPHzHG3/vcrQIoqMYTw3Iy7sL9m\ng+xshk7NyKivW7b6DPix0K0ylzpWnrYFHS6rweDJdY+w7k8s7Pu35WfHrPhi\nsriA\r\n=sElr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKTPjuGju32KCKp/HuJkwE3KraTMwLrDz8Sq5v4eL96AiEAwa7eUxjma3W6C+2jfTn4i9g5HvblRAnETsUvofB2OGM="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.4.3_1561231007358_0.9436610075242595"},"_hasShrinkwrap":false},"1.4.4":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"1.4.4","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^3.8.4","@nofrills/types":"^3.5.4","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"5895498c7d7a6687b79b9f4239137ccbea6ca6bc","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@1.4.4","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-Fbe01uL1bMHsmeo4sj35N6lILQ1qIHD+A8YEuNYVRBMx2WkSqLrjQHLRBx1br5xBGY67xRjykdr/RUNEijOHyQ==","shasum":"10f539b8a71a10f6a8bcc1d071c4ff532f56a5ef","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.4.4.tgz","fileCount":8,"unpackedSize":119098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDoMgCRA9TVsSAnZWagAArM4P/0YZmddYEG4NdEVlx672\nwPmX7MDj5sJpo7IqAOtLy/eUbCuRoEF/wDlh+mGTLpxFHgLQQoe/JkH9QYJ7\nSZ2rq4oz8NjVyLx4siraMf3xLt3Zpwe0mxvIuvT4EaY2t22sv4LhEEE60taC\nwheBigg+6IcEhWPb7XHIE2wZTANQbUEAl8vl2HnCfnYoUrurxAx45p4TBbmC\nuMefiw8mT5nbojvKFcjFLqZqcuGuYIdIELkdzuQnqkVjk0Q2YLp4eSyn8deN\nt1OxpG6U5opDP20xgtza7P5gKk+hS1waL4apWp8HWpx3AmaTsrUuTEmAjk/M\neOc7kHnOx371Wu0Zpcvsous3QCIChyM5qYeH6K94bqAFIAxoOPM0F89LaCPz\nyy38B+Qsib//iq1SFmFlpQUaS/dkcd+MW9JlKx9vW5BkJ08ux9BVvUctuJsk\n9/lDzvUJqTCQK2HH1o/xOTvONulWcLJC6R3tOW4C7DjTFMTxB5RDegKGwCxI\nk/nBAD/i1vES+1SRxcWDlPP2JnRWHr5udoZvTlc/yAkPPg/cgIJXYimRpRa8\nyjbgdmoeVwBRDBdEbyER+GOdvdusPn7qDnwX3FaJcj2b56UF7w5nzmjTqCrB\ne4cnEXXB6F3+VHTbxnhOxBH39xHHvVAvmJ3+ZQOp+zxo1p2RjXGbqe6LUhEY\nlBYy\r\n=3ZkT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCe4KscVYzVFXyzRLXfUn4O0CdKpUl4H7ePW9tXhQWmHAIgKjzhQd9PZAnUk6Ry648dcNIMaFqtj8KkKfvb15XcPDc="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.4.4_1561232160281_0.5771429158534582"},"_hasShrinkwrap":false},"1.4.5":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"1.4.5","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^3.8.5","@nofrills/types":"^3.5.5","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"de3053fc2ac668debb437b3a5abb49fd41af49db","_id":"@nofrills/env@1.4.5","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-PJNtg9+KOr1cfFzPH1SCIVxzKlcY86KnmqnP3LVn6VJ4EyDV5Ss0bpq4jwuWqDPj3ZppUHsPKnUdIzecbpXKTw==","shasum":"a2409c8c38a6f7b5269be834b8718af499f5517b","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.4.5.tgz","fileCount":8,"unpackedSize":119276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDo6PCRA9TVsSAnZWagAAp6gP/iMrgr1o7uMQNiO4jrMz\nGyhTp753UPPiMRJaDbKnRoSZNIFY5nN20XY/i53TXJXk9ZeNQYx+O1dM8/tt\nxnylx+G7gCNn+WL1RT+80zsAT58E1LGLTrVM1B5g0q1rcsxyz52bpg2HEY/V\nsyxhxyvtDpCfs7j1LkbLXphXKsQQYVJHgnyr4gfIlRrYQ76WFTC4Nbwi/T9a\nWHVbLzYqKwMYIN5UXHIIuaeB94otNFe2pzklxgjoOBSg4cHyE6zJbc22yhVZ\n7/vcNLEUjB25rb/uTzLIotzs4meXrAqw/tCToErttPA2WQ7AG367uPA0qT15\nzeb/mwbYXcTAd+P2T34nGZ9496r3RF2TbkYZo4ucuoUbwUdq2s2M7m8w6HuT\nTV9Rq4N8wJg7fAsjZzmA2EFtr9iCr6IF0FwYA7Qhb1iJJbExZm7LakXAVFw3\nkLW4X0+Womo9TLmjkxrZ+MN6hS6kkYGRgWIxAGoDP8tG7eBAxnm/JCcHnxAv\nklyoTziS+yF2p13W5mDmfLkr9kPN60WmbLOsorRFe6aqr4flraAz3AHDcZH6\nxLFpM9lEjfB0AV0FNxj6exq0Dtb6pWsfORvGsGsg5aRdhcCIChJBrJO4P4qe\nfZyC10/4Bc1vNISEBoP+0KpGhTMru4gWAhZBQh55LsDgQ/JEIjOG+oCZbHaa\nZvPS\r\n=t4rO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD82wxmtx0zPw7rquyvhbCGaTdB1q0arLKBGvA+qRCUQgIhAJefsUxKui8oMjDDqVfSSx7z4f2V6RiYihBRTISpXMho"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.4.5_1561235087339_0.33474720551392956"},"_hasShrinkwrap":false},"1.4.6":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"1.4.6","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^3.8.6","@nofrills/types":"^3.5.6","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"3b0d45c99d4ac5e3a4d346f687b7825b4688695b","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@1.4.6","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-tg6Edk1xwfct8qq2Xq/3uQ7aX2jJ14ad8SgvzQ0mnOzj3wK+T66fIl37/bmaSeyqlSSzFOpsfXzR0S39WfOsJQ==","shasum":"25ef759c64b7fa86c06b2213a890621174e46cd1","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.4.6.tgz","fileCount":8,"unpackedSize":119454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDpC8CRA9TVsSAnZWagAAycoP/1LUTSuWD2FvKejFVzQH\nSDZeeDvptWOgmxBQvP5XFOu25r6xT+vYcgQSLISqFsLBCyLnjwx+JLfdLwcL\n9tmcoiHWt5dUlL92MZntDFhq4fi76Eu5BxSSNBJfT51hbIhCgTVKGky3ED6J\nfqtNe5YVJ1dFCb0t6XVXtADgMQ3ITEMd+XhKuOXKP7fYL8suatW64Lj1C1c6\nCUhy7++pqsx87NIu7PhCO5xEN6bfJ/4llQvDd3CGJj/m7eVsbIUPSdyVli2o\njOVS4KIMa+I3G48xgFHfkoVhzXZBhaxTrppPPtp+rWABPpesHolYZjYU+Vfz\nJbfuglNBrt6/7465Xi7CLSTM4tKvhFDp378AGeurLl1pKgTeMjVTBKv7A+OV\nMuFrqJw1Z+tJggn6Dxlw+sQ+uHjXXAankTxpkS4SeImBLoM8Ne7+0ukt5d7H\nLN+D2SulSZJ9+zd3Hvq1QaUtG2UY1f20b/c4FsDwTrvXevS4aNDqiFCNxsCl\nz05vuqqgWsVEwwClPLcpyA7+Iyy4VzSPdgk22gYGtrPKloWobjNll0LpKrW3\nkCGbYYI7FNUT5uE/GYTaRHEkCQsj+aX7NZGlyFGbCs6qdoLWt8zi8PzaWrC1\nB0O4plCDn3D1/eKViBGgretOIho10mNnL5uFv5FGjqcn29eUIlW329lUyLXM\nPpGU\r\n=oYjL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjqJxU6mh1nWYNeAPbz5g4WnIWsMtUiN27/r+fWaYSqAiEAgAs5Irh0mo2ptcpFXHUkkEKCxaeyFkfjBFu4ToDPw+U="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.4.6_1561235643779_0.6289727474910691"},"_hasShrinkwrap":false},"1.4.7":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"1.4.7","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^3.8.7","@nofrills/types":"^3.5.7","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"792c7d60650d83f748f357ab3a970c91292d2daf","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@1.4.7","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-k5x/hf/z25WEj6Rj6COxtbQoOzO9Wz/bFvi3JAbue403RnZvfnrgyIzENhuHgKBi+Ssm48kVgqunuwd1Tgn71w==","shasum":"9609879af08e1cb41665a1a88eec4e233309a99a","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-1.4.7.tgz","fileCount":8,"unpackedSize":119632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDpIgCRA9TVsSAnZWagAAdcsP/0vbwb6RugcHLyiz4zXC\nnLP0oTGCXbfjOU/rfoPi5/I6pso3DWSQDgu+04ZHkibOcRlY9+wpwuvPjiDx\n+78sJ7psontFLejia326eKHLaDhMh7arr2t6Tv5tmwkCzXJQZBWPldfQ1WDJ\nPgmXnONRED/81XvR3ymMr5JeGKOWfeLeniXTEQqXLXBEYG7UTdHSSejOPPul\nSMbF8MTSsVT/KjBa61Oy4qQaNvO7pbu+3wEzwh39JA28neMSJNJOR0DO0S8T\nJVeyKYMt/Q5cN52r9zGkpdJdysWnx2V6HKgyHKCL0ykVhwL6Z6WNmTj2ulZ7\n9H9cVEZpRxSOTp2W+j7zibnwJ9YBSMWgqg7mHAeBqiEP2KTW7QkSWxxZIigS\nfd6/dWU73xfmw2dc/TP1MrAoeRrVlHoFJBxaq6+eIHol4Ypqnn2Sz+Gg2uzr\nIH5DOKWMy3fmOEBWbTmGhlS6A+NNHIoA6Cw6vgOYJSxR69uvo12d0pYlW5LE\nrS5ADnZt58iBY2Z3kyHxc6VrvcnOFTjYr++vTokWiAorhJxLnYsgFsmG7kHT\n1xXIw5/sEExWQYPZB3rFhccvP4FKygYJtra9zbjjFh6XbndxTzyG5u8nxXEc\nZXlMoYmEOOYQoI4Var6Vi1v0C5ML5a9tKIG87Ry+2k2UDwQQakFQfVujNL2h\nja8v\r\n=B7tZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCt+chjh2uMKoiP+E9vquwvpfMrD251DnPD6ghnQKUyBQIhANbwB495D3slmu5TTcO+tcFbT3HX3sDmne76Hc7k0sao"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_1.4.7_1561235999959_0.544459188223247"},"_hasShrinkwrap":false},"2.0.0":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"2.0.0","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^4.0.0","@nofrills/types":"^4.0.0","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"e17c4c460127d616cea4ef456cc329e87ae20f96","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@2.0.0","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-jeQjHluLGVSHwlo5xhs3zfmOPdUckKtlUI+Su/5T29Pgk7TYN4n2FLv5wndUI1EzZrMa0CxzZOihgCcqpt0hXQ==","shasum":"7bc447fd1566296b8ae31387385f835113c1c645","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.0.tgz","fileCount":8,"unpackedSize":120009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDrkmCRA9TVsSAnZWagAAGiYP/jmi5Npxu678dewQMtdd\nBQQxSx/DbMab9h7isZmr1OwI8yFqHVXwgLNX5Qlq5Y5BhHwLWYVFy9yd+VMV\nn76qetQD2V1YUHuR/DOxzYAPD4bwOwd8kC4K5PDYZdOuZrdK7kG9kTqbfbIF\nVFJ8yoXezufAN/uhnu6GHx1YM423A0HU5GbDVYUqrkrb3a8GaYZkVZooxK5p\nbzDjHJhdUhvJfyOiFnBvYA0o/dYPnJqn96w6QQ7or9zOxy49dP2qq+wvgUaU\nW67noUjvMIY0jTKBI7mbkmFRMlMGk0XI4hhQjdX1DMhMiYqJOwK6lBdYLFA3\nWdy3dgR434hTJ2XWidP3C7jqX1TbXC/XGmwKfcyee7ERnenNIrG8Y7Cg7cW5\necsGo5EQ9/SVIgWN1qhXY6qm4OaWA5Hd5tQRBhWS4TR7ewpRFZWMb4Djbxr4\n+anwUS6pUcE8W0UZaQN6YmY5UZl/Fy5L2id9bAIIfkXp0bDUCNXAr3hSkKUP\ncMxgiOh6sekECScjlfse1dXsP9xuqB0kadckRByafyzKnsMYaye+hxE0SBQb\neAuOlw1fcJreRnoDLbhJF41ijwakjWOnJAYt9y2JTNXsfm6AJ1NQXWL7rY3O\nWAVPMtK2RXtGZlrJz0mjg1e33RiHkhKdQVbfdw5Mah9HGwP8i22H0OI92PXi\nfJjd\r\n=MYJU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzmdXBBXCAt7fe9DEFuhh72mpRqmFaMin9fv1vPgRbAQIhANEj0Khi26qIklXr5+YSeLNzjtRz/i3mW+xRy3/Wohyb"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.0_1561245989493_0.2791185375775247"},"_hasShrinkwrap":false},"2.0.1":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"2.0.1","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^4.0.1","@nofrills/types":"^4.0.1","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"e10d16cb113ee35b99ebb76cd9b3c3634689886c","_id":"@nofrills/env@2.0.1","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-OQmUcaVaC6Ot4No/TiKN9qnepKlrDnDjM8g9FyUj46cFCZjFZs5L9yb9PqWQisjSwFaIhZsF0tW/mwoYFA+9lQ==","shasum":"c5ce53e93678fce7d440526ad9bd618cae1bb769","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.1.tgz","fileCount":8,"unpackedSize":120187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDsHECRA9TVsSAnZWagAAdaoP/RIhHrTsqrDRro1VDkHW\ncgsw0Q7K3UOerBcj2sI4BuQ9Rz4DwAV3CgNkxDuXw5XvZS7MTJbBoWh9KlKU\nSfSUlzKhA9BXe2a9TA/abOI+A6HcdugpKXACfo5xi0G3cfZxwHap3PSDsfx9\nOOPnC/j6/s9xuOidgWOMcex5GTkVLgwlwzofFyZMo0jjQ8m76Ox/O1YZc/ve\n9jBXmXlLUyeoHAu1RmM0hRbvZQ/rm+x3BpTjvTCzrF1FrASx5sMbdipQHfMH\nu5qVRTrwFl9nZnTsZEucU/F2BDSe/Rim2V2h5R6cAsoR3blYoXMbwPscjDRp\nwoTFfUwwyQwiiclQEifbeMXI14PqIqiptuqI3jQijZpoFRMSA1DEhZmMR3lj\nq6nRbyrX6Kw1JEIFpVedLT43uaH3/p50isjlDXRkLAR5lEeG2RKXSYp3nTrs\nlkqnbOmAkgL9t4oGt/tOODIDuc6hUuVAfnHQekI+GNGSYGZEW/ln+oStvltx\n/5+mSXtmi3jNK8dUvYbx12TOVPlmkDBL9Tk0u4WaWJm3gmzBWDSvxiUdgDBK\nMBYMv9vOx+Q2Lp2XeHryStu9ICj3fzZ3MByLU5uOMbb+c15SK+iViGCDTfiq\nK8aCGiLysSn7jQYaUWAfHm5GPzi+yOc4FgkIhYID3dOBjtcN2VlsVoaezUKL\nzmGb\r\n=PdEr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBsFuVYTEqve+8TRcgqzppg7o3J63uTNwO/tcc76uPaAIgZz678Zg/3az/WJi22eq2h0ikGuXjGU+/Tf7WqQFPZno="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.1_1561248195870_0.3390579621083727"},"_hasShrinkwrap":false},"2.0.2":{"private":false,"name":"@nofrills/env","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","author":{"name":"opensource@nativecode.com"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"version":"2.0.2","main":"./lib/env.js","scripts":{"build":"cli-tasks build","clean":"cli-tasks clean","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^4.0.2","@nofrills/types":"^4.0.2","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"gitHead":"2aa7faa32d9fb7c1763e260c36f73469f81ba709","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@2.0.2","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-BqZLwV6l3hH8cgq0+1zGqrC53AFPL0LYQ44mn8recjmLnEYc156TK2FPLexYFvwXHVL0a0YwSERT8UD384v2yg==","shasum":"edc21c2446b3a6b7b2f23f53e73e02570ad4627e","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.2.tgz","fileCount":8,"unpackedSize":120365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDsPICRA9TVsSAnZWagAAQssP/iu97oeiFNEIFeuL4Foh\npM/ZokqS1/g8mXT+bje9KqarwGeonS8OVMnYwXfOnLG/H4iIS6lAt7Rgb6qN\n1a/Zh+x6PLb9tkpIaPtib3cU9Y0RKmV9OlVC1ZoNXyMiQqHXR0lXZGpogx8T\nhXc0OUhT3YkUMsWoqAFrqOD9J6FwFNLFWbjrGJd1yFRh178tzzwzcCd2sFEy\nl5RW0VeUE0Y0aLjBZ/uPlE3tMFzp5dqAWwasmf17RrUZixO2DKdptBHX1/hM\nKm3xJ0ndy0yZAakGhla0EnN/df3HcsUIJrhMsbQoESRPLcsAzUA1nhEMFqX/\nKrsmo+nrsBDkVbg/d/nQtwicGAp0zT9BMmtZO9lPT2NfR0pSXdbWSrzqYUvP\n6ErzagUnFCT8qjq81VoUa08xXBSvAN4VeEclerssD8mE+gQiu1DCObEWedaG\nkDUq4/BMorWlObbJdKl7MfTmsHm6HfSBbth8kg03LoPNDjjaEwYmqV/T8T+I\n1aRrdpVOFqrfbjhelDq1CNVpFfk1e8a8H6dcdEUNPt538w3v2Rd2VbakBtBs\nxZUeoLkOAlEX9whtL0Zupj+8LPjHoaHO0a1nDyZVczcjzTT6NaQmadKrcUQk\nUmk2MX8pOdznfmjlVue0P7+KnCvwIE5ukhpnFz3EccAup+rPqnxHZUZmyxUu\nNW/I\r\n=E/lk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9LQOm3WUxG2RazLxqn05IWqdntz0aoJJpYPp0MtNzXQIhAKEAH+kmg7kV9sO/w9JZ6bbsl6wCG5nupEIfFvmp6Re5"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.2_1561248712025_0.45598721327119685"},"_hasShrinkwrap":false},"2.0.3":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"2.0.3","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^4.0.3","@nofrills/types":"^4.0.3","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"96f51123de9bea6c29e13f7fd8e736189f820ed9","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@2.0.3","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-i4qHBTvNyUmrTV+ccb3hYkG9X+VBKZvPL1MucMl6hjzFPG66mvB+gYj1DJoHjElzgoJn1RyKNn87sC1HKkg9tw==","shasum":"d95ead11633613d82446979b529118019520c24b","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.3.tgz","fileCount":16,"unpackedSize":124284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEB8uCRA9TVsSAnZWagAAs1gP/0WU6dPNcFqCAc6eox2/\niaMeXU4WcrqZFhowmHuBehZHujIx7QDokL/g4D1s5oZyBgoF7xQKcEVwTBJB\n6RE5J42l8V8mbOCbJqvbYOrxoO3SxLN7U3JgR6hLsOpacIsOtzT+EzbqzvQp\n7cTlm6OzTjPIHlm6VNdogRj5rrZBcUJEXEZRatVI5LRcGlo7tpx/j741Fo6p\nopFU5i2kncz1Zlj996kTPxibrQH2AsCLyPrQi/ru7+cul1j+UqpguPkkg4HA\nRMZhzlHa3KnmBL/BmHiBLfh9JKHbn5is288cW0lCJLI5akIjr4bft7YjA/KI\nxg1dz31XNBsFvqFWDG4av67aRfPXSL0V2NhBBhKHx5cKMC8mPS+0e40bKk0I\nonqJbAeTXYfs1OFSiCCdz6prBIqknU4f5PjjZxtePfeRFHhU0tmRMSFmDYql\npBhmbVkuN+yW7a94Q2Ypz6wB9kCzOmQwflffTPaBqIOCkSY4NQvrwvI9eeM4\n5fq3K5j4uAsaHVTZMk6ZMqtYbUMDn3PiZMujNMsubcrxm2Z4q3jAg9/SsSLU\nRsrDIV6L5yeaH2W/c9QkfsDZvoQlktfMQ3/YS2VwW5HLz9NEYEO4CgpjpaAR\nuUq5j/gWuSCzvs4c4A0uo+DaVC/Z1zG9gvsqDEfzm6v2JHxcylaqv3s1hIsC\ngNlO\r\n=PmJQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyih1dhcqFRdoykormCJzYsbqEjKM2I3M3+w6BK76wqQIhAN1nkSirh9MmWtfhJUpWttdbSk3roKubErildGKCOCFr"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.3_1561337645724_0.5697765165661923"},"_hasShrinkwrap":false},"2.0.4":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"2.0.4","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^4.0.4","@nofrills/types":"^4.0.4","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"4f2fb7831ddd6bda33b5dce82ebd4856ebea2513","_id":"@nofrills/env@2.0.4","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-eNtgzaLjoKbJZy5pw8umd9zHP1G2J+FpsKLsxxv2bKN44OHZCj8pKPiUacBgwEtJqP6QbbgyQURBFJs/OhhIqw==","shasum":"a3bbaa84c0719eabf74029dbe4cc702e2a411218","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.4.tgz","fileCount":16,"unpackedSize":124462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdECCXCRA9TVsSAnZWagAAUowP/Av2fuFjtecfmZ5FWQ/7\nJ4dkNJo832zK3Z/4GoWm9U+TgnW+EY0uuUNKlPcP4ZaEMTnkd+wObQPVDPl+\nmebV/hr49nyX630UP3+n0QEXd0bzv6ScZ3qAZO19iwmod2T77kDhCt29GjGS\n5AXUvX6Vwuc88Xq6PvqLrUFG04CZEF9NfC3Ltw+13BGTAqiVUTOxk7NNP1si\ndHtjgFJMx9wq6ZnpzA0gU2OYo/MzORFTXQ0k5WKMhgu44xRmusbhdMA4vVBT\nGzxDUfmNGn6E+0TP741d+NMQ5o9D8+YD1+OiQu/JQZ/iwX+ehKSE97V8ynMN\ns1VpPIEuK88W2YIjxkkio4h3I0u81VprnA+7m2E6WBQlncbPoALnYCKGZDOx\nZYbD5nO9DMou3m573lkTVDx9cW+PUQRTb4dafM58FsDZdLQxAcwCoyDSQeLa\nT3C52IQRI3lE2GC4col9JT/2sOZHHvqci8vUJyq7/FlGaJaHBoKRbR+jG+qR\n9ciZm6unimJtGRooqY7q1BLUU86m8VV16OYjLPpiOjWHnmuCQyf9fbLMAM5u\nt6WBfQHzeiMv3o18wJ2vcu/MM6SXrZjkqRnJAaX2fAT6RKbb3TpEtpu7Xj/d\n0/0u0JAUjQx/i4mc8NCur7vZi5j1il46thgwmYrqUfXEY1np6b4e03CXgmje\nuI5R\r\n=+7wP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzMVQ4cI4UgiO+P7mLx/2nh+o1iGrTGl7EyUaIMYa1rAiA+euwe+/0PoMDZV7XI2UJHHxvNZV/RaifLGjhpDlIKlA=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.4_1561338007168_0.8713291548439879"},"_hasShrinkwrap":false},"2.0.5":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"2.0.5","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^4.0.5","@nofrills/types":"^4.0.5","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"cbece14ba11c6f31d119996d654c9cf6ab69a355","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@2.0.5","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-7TK9i2HaMlhml2RbelUZEyqQh46nXDX+GIKWx3hCKBOAAPYWup9m1pmAqe/x0+EDpbmoOC//dcltz3od7Xy/qQ==","shasum":"2864ba2a3bda403e152d928a90b10f62b4ff049b","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.5.tgz","fileCount":16,"unpackedSize":124640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdECJCCRA9TVsSAnZWagAA4JAP/22OqY6EzSc4AJ9dHxqI\n0Hj0wLDMPcx8Y/q/zHcU9hGBxAVhFq5OP71Fn2MHf7Ftwne95XusU39VFbxY\nEXDWV6Al+eCmRZDn50ODUJRF5jr2n8snI0DZjLWSDZTNxi7c/FtrB5l5e+NU\nFoxulAcb0E3cpBcnTblO8W1EUhN8yAIZFh4b5H/b59N8NPigZDbo80HywXhg\nH9Q6cpRh7BOGv+nFYfd/Ws711iyYfH8rb+LjxX6mr/orYykCrmQ+btxRAWxs\nloeG/wSSMYnQLAE04Rc5vVyzp3VV+Zjnq1NnomXAjyoZUkDaXr2EWfjp+CdT\noqZ0qTtuKc7RAmXVDZY6Mmd1BDdFO3WNcOPEAJI0y5H9jUwnRR8cPRs7BiI+\ntD6rCIfpWo4FuYftoWTUTpKA468yU74/qAEPF+SKfmzJ682M0tSr7cet4jxH\nQWNMaaV+ldS08bhAmlFDyCSvaQtzhEzHxta1nJzxC1Ecr7thuYRcbADpxpUU\nTIvcXmLkxtXE82pUz0ygH+prjCtDV2v1udcNykKdOD85mGFnXGfxDrMgiBtI\nb+IXeQ20Vnzp+AaAJTAAwK/Gcf3FgmHBseq2jcRdrOhJw3Xfnqyhctyp2lKM\ngpbsePNaqbPD3SlGPmb+scB0weoLXCoPAEaXhhVshUyo2t52r2c5ggFVh629\nNWgc\r\n=XYQm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4PkYsqpKHos3UMLrBMwKRvOqUG3tNRsQt7x29NnS2DAIgNPkvQwHH25/KFqKqiEcSwBXZIHMJsxkJ69RAvU7q7rA="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.5_1561338433894_0.8467154670030081"},"_hasShrinkwrap":false},"2.0.6":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"2.0.6","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^4.0.6","@nofrills/types":"^4.0.6","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"d2dceb4f320160f84ab26e0ffe16b1719f559efe","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@2.0.6","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-pyoUyTPjrd9IgMEIhjYolEG+L1G581eaVrd+qdvzevSOzWYibpMx2E3LFWbjB7Swm0CTvwstp9/Qrif/PxnYdg==","shasum":"d7bf45d15553e36e57de4593af86b55c571cd267","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.6.tgz","fileCount":16,"unpackedSize":124818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFIVdCRA9TVsSAnZWagAAT/8P/3/JPo+fzz1lOdghdHFt\nkdUHytRy1ExnWyaCI0W98OeEulODTcDhwt89ZQgN87DrBo+EqCjhFHbwyKPK\nRR76bDB+8kk7DSDKbaauMNQOQGam3nf6zHkQuoppFw2E5NJ7qfO5ID+zCllQ\nWinceoMNeQwfITxi44+r+8lUzgwurO/T32MLaUmDF7UFNPc03GdrwMIZZnZZ\nV/RZ8rgNrVZj+6r5Nr2llSdSHjvBko8XcckfZj859KsnT5Xz6krqiMAqKqj4\nwMM05Z+LcsGRquSsy1K8ptMvvbrwo/6GlgN8peX7tsCv3HpIIuQVkmERDoUD\nCsKmWd50DHQsOA1ZZUiS5HqgGtmMHO2MhPezxKYzPY9cBjio+kivPDRrScuN\nG8C9zUw8PRLL3XBgYrnd3V0ZHK6SunJ6MjR2KD3FRYQIVDPy/RYEsC4MbIqF\nevwZOtwWJTb0J/IF4OEqd23BLYCS0t/Th8EMQ8AJ+KJAenfgc01oELBvn8FH\nyf44cBNO3a9vII4A++zX9vvD/k+A7YpKZeDx6Ji6RYQ+gaS4KdvuBBv8FNrD\nRiXVS5bEf7ZXVgkQpImgr3AIs09fnEOCCFHvzgkD95o+m1+ciwfLkciRIJRr\noVcz8A5As2HyZ8kPH+DFtgdcJ0c6IsPx9eVoFOxmWkP0n8L7TM8RwgPJRNoE\na6NF\r\n=0uoZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNEsEMEv0lzCwOi8v0EodwHGbn2UqaaFehvfmM9ZJRUAIgEswJD6emqAuLsAIxVra/6fQFOdkgnKQhMS0oeG4CeDI="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.6_1561625948399_0.16147896012252683"},"_hasShrinkwrap":false},"2.0.7":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"2.0.7","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^4.0.7","@nofrills/types":"^4.0.7","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"5715221e7032329379af34786ccf59429b26fb4e","_id":"@nofrills/env@2.0.7","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-jQVNn/lNFNl9nwflrQJJ9gPLPRBZC+4r85YJqEFcYBM7gIr9FZ9Zs6smBoD7Nhuxwc+4rpISz5o3wDG5iLsLIQ==","shasum":"34866ae27b22b23378246c0128fded5bd73174ab","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.7.tgz","fileCount":16,"unpackedSize":124996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFIdUCRA9TVsSAnZWagAAEdoP/icOocxoC104QZVF2eNt\nY4yjMCSBWeBMomgKU6HIsFuE2tIw/Y4LcM+I+Q9sXcnXXIkUf8W+iAtZ6hlz\n9OrmyrLvUvLn2w/vOYlPTuqbvFK+Gljz0Ceu/CSKJfnwM6XqE1MMdUxLOzhO\nJMdGnNiwuL3UuxTxcDixGHGUzu70Om9V+vlOp8c+r6bYVMfgvH4h4zOJHRmO\nuco4gcMZwzD6RTDSFt4043JQNJ43bG1tlXho23B1+EfiCsZifPodx9V2SnAm\nSmpArH9KUmPg4cvZAwyc3f/AiL2m3h9AqWP0kd6+2697uYBwxK+oMjBn5jdz\nGk+gNK/mhPEvHUL8+PDMLg8phrgDBvHuCPsmeojBR+yOQWbEtEi79ycVbBwJ\no+mJ/JdLrgDuw/tQB6+aIUh/OwlwnvP1BJIy2uMx+GS45sDhj78LyjHYrj7T\nJH34Xe+ulYG2tIJZDy/0Uyf9drIR9H5iGKWP4fUB3S/8BUz7zQjwxBN+nkVc\nCTwbzhZb5nRgBMq8eAMxX35NmZ+pz2OZJTYeQxYzaX1WuwzlDHkkfGuchYs0\nxUxuuMa/vgF48ta6p910wwwRiDdeKq099ZmFeHbIxIqdNVrsKJN81sqhUy8z\nZUDyeI5ZYpKNqBTJkBLw+eeWdcW2GPwyuFPcAAIe+EQPpSgGdi5vl7yTFQ4l\nI5w0\r\n=hyLM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEKZQXgQOXlz1fkmN6BcYBdMH8jazZVVOwn/bQDGNVEwIhAIW1RIVDAcy5kllhkVaZJvtustZ5iQensSHNWM7M7C5a"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.7_1561626452375_0.46368063714313545"},"_hasShrinkwrap":false},"2.0.8":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"2.0.8","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^4.0.8","@nofrills/types":"^4.0.8","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","npm-check-updates":"^3.1.10"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"5e286bae16ba12285b3115600e968d944544962c","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@2.0.8","_nodeVersion":"12.4.0","_npmVersion":"lerna/3.15.0/node@v12.4.0+x64 (linux)","dist":{"integrity":"sha512-l+0aNDudJ90NYsDYchgA2ylQY8MrVrG9hI63zRyelzzlj2sxMvHMxfRYHow0tsLDaywvGg6guZu7pJ97YcWKNw==","shasum":"fbd7a3a4975e4a0ed6af611a7bcf279a9c86c809","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-2.0.8.tgz","fileCount":16,"unpackedSize":125174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFIhVCRA9TVsSAnZWagAAc3IP/j2TMDfAfTIqK3zvt3Ed\nE5xx/kqO81MGIIGhGbXskZ53aElGx1n6n21MVx5bDKAmhXhiTTv90DVSSrfH\nNqNGuDWVHnXq2wdH1Xetmf36SZYQzP3VUWr0WIfJ6TjgVAI+GzTTXWSeY6EO\njxs99DFtEX5b/ulTY6zoN38CAcUWiacZ/yclYGrQsXyOXKvE5ibzxIyrJvk1\nSYD1MPukdyKDp259UhNtaCJN7YUny2xNoucnEJmbO3u8M+0Xfr4oTdnB37Ea\nGayVgWutcvrXjWIjo8ItLuH2ZQqefIm98P8IUeAghsOKTQtX0znmcUQ1bIc+\nA/lmmbBwQxUGrdeK5ep4s45blaNN1i2N/AZyyAhR7KrjmjWmtlp6iVXaK+nw\n+imdKCr9futwiSwmOyMvHMwN9L933UL8wG7pIokZP1CXXwGWyI0deYnUA8CU\nrwEBIovq5rTeo10dqyjNFkihsqCOLCgxxXyuUePmDE7fVfG3H4v0BjPkwd3+\nbutqRGvmYcXMNZkGryyWIiAXyQl1YwuuepYJHqbIyLcGiMgOmqVJ6H6M+tld\ngtFgoICSCdxj+rHBhWr6aAtL7BNPD1yqPFURhLTUeuMQCDHzKcOZeBbj2yh6\ny+gBLZBK5tItL4ylye3vNUQfTorJxMOGvN6vhMyOUnVQ3lWBo7MLqNYqHQZv\nfxqf\r\n=AMFO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDORFk5D0MatHhK/paXvdpQPn1xDUfYvAYz7JRENP4cuAiA4MuTOfUzU8dhHlfqJkx7LduKsaW8DiFKtYxQ0Netktg=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_2.0.8_1561626709291_0.4207315387550292"},"_hasShrinkwrap":false},"3.0.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"3.0.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.0","@nofrills/types":"^4.0.7","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"5e88027d047b9fe634525e9530183cc190a7a8fd","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@3.0.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.15.0/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-Te1lN3HLDxsu6sK1oo2GK0OwOorDjN9FWmA38IP85CLcLQln9SibAAi4SDRfNHccfKd/0ws24KQ8/ffKuE8cpA==","shasum":"f5db1f6deecd78af2100c9e37985a7a543c37bbc","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-3.0.0.tgz","fileCount":16,"unpackedSize":124657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIRNsCRA9TVsSAnZWagAAe3sP/1qkqCrIg8DBJDNM6GH5\nCl7QHjDdg22zaLOgdCeVxQISAeEJCBkFFNWjj7H0GRwqw1G2ajda9k1Q0qP7\ngj/Y0cdnv1AFG76qEFCv0/ehFrLR3YAWlBI3S+8P6jxDY9TSvrA4BN55WfQ7\nJpLF4XxfYm5q+6GgUb7L3LPt04UrovYoA9WTeQHUkTftlfl9rUEk57a+L37y\nC7SFmDMhaO4+XSAMm2zadVV7BnJkNkVtYfTpZKNdX+3JjQW9URV/A3i4PavF\nX5weOW9oTsK2nDSI8wjpqZCBxibTw4xmWayhvqxV6IsvcZswAxCX9Qjb9v+V\nRYG+kk6FFmLyWj4Ad9KXV+iS3mhuwuTz6auTVB0+4FB+swUM8ZXPPUl22dBM\nAyr9Bw/RVtG9mOYfVIP+89odB4iXvhJ/rBMtb/qq5ahf5oy+M0tZrT1GDDNf\niTHXGO1sOadsatpT3+f30LY6ZTb8zEk6c1bAmu9dhf95luzLfZtyK/jp/m1K\nyKO4qKZ2I/3xH8HWakxZw2BzySYE4C0yUWMcxHGuBvQ5segLA93Vcg3KIjhq\nJtwH7Y0YGUJ7Z7uG+T0totOkun9Dg741/AuHsjXt43wyIQNOluEGT6oMMKR8\nCBk0ZQLsnIGPhGS8r7sHxCoR0ypHPlSFAwRb47r4/RjpXLNL1CelBVqAzdL8\nGK1F\r\n=WdoQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDEMAwKKkQbBhmMQCTORwSDRNmSQd8fU6Hv7EeIS2fMCAiB05lgPJT/5X/ovEy6Evcig/cGEjChpZfjthOepViYcHA=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_3.0.0_1562448747776_0.9874605554767097"},"_hasShrinkwrap":false},"3.0.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"3.0.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^4.0.7","deepmerge":"^3.3.0"},"devDependencies":{"@types/deepmerge":"^2.2.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"05b0b3a54ec206e58da0095632c25c041f3d7da0","_id":"@nofrills/env@3.0.1","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.15.0/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-Wwk/mkT3almS1Cym8R57a+6jY4AWRlYa7e95UpLs05CPJNSpI7bt6juXkw8w86MNboy/iE+zOiVevCggMk4kRQ==","shasum":"42f60ae9581e30a4664b418d2e5f04ddb3027784","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-3.0.1.tgz","fileCount":16,"unpackedSize":124835,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIRTjCRA9TVsSAnZWagAAnW8P/05WoqIIvB2xPCUeCVuo\nybHtVE8PRxU933RZ9YeSVxbgmJaSTLunlfoMH0Y1gIrsj6ZUThg/dMildWtH\n5XPMHeTHvcLtojA1bDkzcj3Ki+x21Bvs/14yQ9ZatsGr7x8q2kqw75nowc8K\nZvDQ7affvyiRuQPuEhKs/EhfAEin5EOCbVViGCTWOvjKt3kolV8y4avi0p+t\nFnbRyFGczC2OP8TyrPf805fUz46YEvvH6DyW4iKR5GNOk3AxTmJ83h30v2w3\naQhQR2Lr756l5j/9BwZdw7gYC2SBI5/DTx+J6vPFZ0+rJR0frGHgrSJOEk+P\nyVtKwsw681Z7oaCVkXGqpEo7CHx+C6eHGqQCBtcRWONdnqX18TJrhG3l4HRj\noAcJvCZrAX0CsoxQr5sMZERII5O+ZJwqt6OXIo6ieaUiVC5k5o02QJZTex9k\n8dJa6W6e92gqYu1YH9oq+GVKR4RlpNfQrwCdzY0UQjPyGgL6yYLpRZB1O+ds\nPtY79RDdo3GSNfReRLvQKjZXxNCxPAoU+KZVkASh2w0h1x5IsC/SyfnTMRV3\nkfqVDZ27oZdnv04tSZDmlhgUFREHu7uqulMMMYM2Xu55z2GchGveDu6BctQD\no0uaFRZEeE76ezxzh6NJ+cNeQLM8222HD0kiYYdW5qqPxp/3DLpJByO7H8r2\nrRA8\r\n=esO5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDTBOZd5uWa8psTaGTFRm2efRIsGiGyXYUAjtXH+rqOgIhAKQAcgne+epr79rQ+c76FfeQyul+32s6kt7ii3bb2OyV"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_3.0.1_1562449123077_0.9586617784928149"},"_hasShrinkwrap":false},"3.0.1-canary.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"3.0.1-canary.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^4.0.8","camelcase":"^5.3.1","deepmerge":"^3.3.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"a2d35131e55ed45157a6ce770303d1adf57e82dd","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@3.0.1-canary.1","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.15.0/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-vTWjJ4S9QzwhiH8py2kCJ38IbliMEs2RPXCSvH4sLwd/L37ccwTTqtrUsVd+d2fYemCy/lUSgqwDjP+TDQSvXA==","shasum":"952f5057ad0e558940666d0412766eded80e15ec","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-3.0.1-canary.1.tgz","fileCount":16,"unpackedSize":128369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJBiaCRA9TVsSAnZWagAAmNAQAIiBPMDT+J+xP9LFNtwm\nioI5mSbe7Ldh124qlB8bav1NofzxHB5DeyFgrC7Jmefrmb9U4wY2q0XeZzU3\nAC+n66AvqBNCBwZu/afGECoXLB8LKW7vI1imZtqKKCXLVsg1+lZ8kxQ6gvRg\n5mqFBYV8BYLIVkgwOTWTyEGFi5FabAnGPKt6vvQefegJlJj/XnyqZHNKCzDD\nAoh622RC6HOWxLJ8NmuQuPLxVd+Yx945Sw2cVsxbFNQ+QltiKvbPhjn6mFZD\nSMrmSX+NSzgcoIJD+f22DhGtOlC0GVEY785sDDNIkBv7aEBmYURSaHkVXEuV\nl+BFJqEhfLKvk6iliCKgeuKbPHFqDNgrWuD3YKkSPY0JpF1tswCjZnm3BBFs\n6DbFA9zP1KbPbEH/8RGjYD1TAWv5hpGxbE37E8Ek3O9/g7nB9UkHKpH7ETXT\nLfSzRyXvDyaixaqEkJpdtyvxto+MN53SebcQVrFlLAUyMPWkABYamsWfjotZ\n/mehcD0OGUGfurlIpSdRyIyP8/x7eDQJMOdMt/lMn9EXTSZjqh7pjWEg2Jbw\n3PvKbDNQhpkuiMtv0Z53Ekt5xd3zV25KOlMwbTTdlMDy6vGtTZRSHSMGqujA\nHaUqciQyFIEAB/LWhnPmByxaEnqxTZai0GNB/pGaUeYYgVIDi6LqMiYst/2p\nxMXY\r\n=cagK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDATr7AQqm5Ppe5yci3nnlC0sbweFCzSL3sH1A0Grg91AIhANE1ec1o2+G3fDicE+fciOc2kgNIz3A87SzZ26dqz90S"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_3.0.1-canary.1_1562646681933_0.5119906347910967"},"_hasShrinkwrap":false},"3.1.0-next.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"3.1.0-next.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^4.0.7","camelcase":"^5.3.1","deepmerge":"^3.3.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"76500c138d1ecf1318d95e24d2e886fe0ec27239","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@3.1.0-next.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.15.0/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-VXcc3guzSyhozQF+LN0oPdo/sooIc8hvoHwpYSd/Y5Q/e4m4Lbgde3+k5X+91rikOVWnyPAKRY0UxBMfAHODYA==","shasum":"9fc646161c7cb37b072579e6d0e9b3c63dd20be7","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-3.1.0-next.0.tgz","fileCount":16,"unpackedSize":128617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJBsFCRA9TVsSAnZWagAADy0P/Ayz6+eKSfscS5iKV99Q\nEI6tRDalXSX8e3moiWfYSziXUAiZ/nMjJ08Xk5RY1jKEnM1/vNv7hJt12t3V\nJYqgSwhS4IF3OuA6REyBodW0HXtv5+b8DNZ6GGRpe6jnHA188vsuuumlLdg/\noO8pBiYCe2l3SD3F241x04KMXfJpseM2/eCwLxV6nW+ur58eD3F/fr8bX//P\nZtQX8UjgXkF39xG3jL+QrM4dwNO5tBKgbqboCSQdXl6LUf5iec0xLMjgmjAE\nGi5k7SAYVSOM1Tsyuc1W2TaaYNW+N0staVRc1f1PRnC7LaGnv2kikguPpFaC\n5AFnjauHyYcoE3nivln2IwF+kh+dBD/Jcx++LGUirgnvGXS3j9iXV4wdJLqT\nUOy8Qdz3Y6kc+GuD75hM+h0dLRnyGMweQwjRLhVRD17nw05R5cBf07+6CIXS\naUG2abrX3ymHPX3p1BEO0XfCpVHpR8igYUJ9II8n+2pTyOwukc1NjEVt8z72\n1zTW222WFpZlPQcrDeCna7nXSJ8OzfAhJCppDPLXmqpgvT/Rh2x56wipP5FI\now6c3kgkSRofGmydjF6i/jqEWaNuLB3Zr+DPD/Awci8x90KUViXFElBh2/lE\nXsDEEdj4VzsbOqlcVAwMv2w0UvxsiCIMQ8mfHuFjs5vEZE/mphHATa4F3+j9\nr8w6\r\n=IkKs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRcSwWqMJeVhgFXdeBGkWg1ZhiqDx6cP8cscwiX1AwAAiEAwjJGUYOi73ML1S5Z4n1QnWQHtfTMXSdYAwsgD7TCoM4="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_3.1.0-next.0_1562647301354_0.9325111355999045"},"_hasShrinkwrap":false},"3.1.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"3.1.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^4.0.7","camelcase":"^5.3.1","deepmerge":"^3.3.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"74d2c867ee9b21896cc38358b396548d4e134d81","_id":"@nofrills/env@3.1.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.15.0/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-tR3BGLMd+xS39dOmvKfAmqwwSEl4by6kD40/FI8/z0ZESLOL6sp2XYNGIR0YAMtQCVQIX3jzFQpxcCswQ3d/aQ==","shasum":"0c20fbb12090f3c762c050223ec8569a2da7ba0c","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-3.1.0.tgz","fileCount":16,"unpackedSize":128794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJB5qCRA9TVsSAnZWagAAMMIQAJqudL2MGIoTjK4ttPC5\nXRnsomb1K8m9xKG0q43zoHdFS14mr2GWtrVqu4FnINmi53sSB+Ffem49oeea\nO3hCWbGMmJnnlmxoc73Yi4ntZiBhna64jRG3WbVQkHOeXre3K6rK+7GAuozc\n9MVBFpldL3gCGCqrLxEIIAy66BbVkJlpkM1XyBGuHMADiKI/3/lPjZQMESX2\n+2ATSsS4XGnWVQFwAoOfmPAzssXuAEUlnrXzymEeSbWiCyg8vwvNiDLKdill\nzwrBf3nAlSfkobuMvgpajJHswSUZI7gf8e+2d9Ijt7vGHW6TWMtrqgZo2uT5\nEQoBucTZyBZ/C7R7Xq51mY+OkipAgtxrwyKsY0/X6Y7+l6OdhWbLmNpuDI3j\neKnVvWtueGJIoCjMO+77ZUThitHuOQ1V1avO/iCL4ZnfgiffzjriqKVuPezK\n5D3EDyNJDZibo1bFCshXdX+UqDgqEr/RwcG2zgUxBDgDErzApXlOgHbdGHf7\nSQa7Z7Oi78mBwjnqK8rim6FcBGp1uK2Y/Gj14xnHBPu3vvNPcL3oJGUFVjiR\nHRDtycO6XH9vlqwFivePUJYKrAnwHSxVjHBpjxuS3UO8te4/eAatfdHUOBsu\nIPhgZmWQKUiUDyp9kYzZO2ObNt+bj/RW3OGf+x4ngNsBZYGK3fqOidg0ewwq\n9xyR\r\n=Kbq/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDamEPdQSkdjxVEmN1uNhyqTNWDjy4neaPXsP+Wwks2RQIgUE1z0l5CHnKk41CBODPUWpQZe/tsda8sX/mcJnza0L8="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_3.1.0_1562648169959_0.6406662376014274"},"_hasShrinkwrap":false},"4.0.0-next.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.0-next.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.0-next.0","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"20158f347249540ddef0f07929ea3e6bb9bfa674","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@4.0.0-next.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.1/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-+vuPjD8A5/6g0/DnNTG4b8WRGEPzr9tRU4t032+Y6ViqUxFq2r0++oceWct52jAXe0ai0d5A8+9wp2rWp6Ti6A==","shasum":"11b31feeb46e1f0baf05fedf54e0fdff1cd3bb29","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.0-next.0.tgz","fileCount":16,"unpackedSize":129622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJJ7CRA9TVsSAnZWagAAJtMP/0WzAPFAycUynYEgoJRw\n7MX4G8xYoVD1Eg18io9+0YHJhkrRTjiJgI4/SZL4DKRy97+UeN8GKjcmyZMN\n5G0xc/jgAmPKjzBc3qPrZDuO4aqbHTR7kyLXfeeo44tHJ97drmXZAOBavw4e\nNYXw4dkF7qEM4bbP6TnOSjWjmj9OXcwu5gH9hQyTw8sg/sYn3wEDMC9XwHzS\nQj2vIUZvc6oaByFV9QFLuzwRI5YFwx+OY0XLAC8TDrS/LB6///BjmRhA3o6N\nEujUqncJktc4U7Arhweu2s13AbUdOWItR9NAe6T8j0KvdkahpHmph1itOTTT\nbamPz/v6lsg2Xzxwk3p8oVudHcBLIxXej0KOXer9JxVNunUQGqbpdWUmZaLN\nIQ9iVfso3p2bDNNf1YsL8D8Vuj8LwRk7FDA9nq5h+vUEzWlo9JtI/T4eE3AZ\nyB1MvJA7uuhG+19INpHeDVmnHe+PVkDdgW8v9YLTp7pjrQL3W8OKHpap7crI\nU72yDKHb9B0SN36AI+h+6efI6b16sXSdWXPBbjc2xGtzKfnhV/EyAl7JU8RG\nNzzqHKVRmN6gae8vgS3zPXUIKwvvheSCbIswljb/8uJz1t7oX09Ne5s0kfv6\nPMg9o+XPoI9Ue9lzWzDkuuF8JzXtv9grYjilCq4z3aBbh2jC/P5+9lY/jSlH\nWw0A\r\n=wUqP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIo8YR/OnxgN27AqyVUGMzEtXFxe+0X6OGIE8lkfxT2AiEAtjnIyEoi51GHYE1Lnfgqg9wAVekjcQxELNvx+eGXinY="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.0-next.0_1563726458671_0.8654830406977057"},"_hasShrinkwrap":false},"4.0.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.0","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"79e197631167c23e99964514417165030b29e830","_id":"@nofrills/env@4.0.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.1/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-Ow1tHqT/jCXceNLHP9EZEkqL8eesrs75DG1wao4E/aT8YrsYqGH1tDue7M9kgApFMvI2U1jU8FxuQQ+/S69xLA==","shasum":"d3027fac413c590f4dcc77701d7a97aab32718c2","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.0.tgz","fileCount":16,"unpackedSize":129975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJRTCRA9TVsSAnZWagAAvBMP/3mKiaJSC/wdHc4E6a9h\nN1HgtiYgkr4TMG3xQiE2QA3o9kT0sgfvIjRQgR+QjIUli5jCQMtddjtP73Ky\numdmd88qx9GqfOVWjQNhzRIWMLZ7AMDU4rrbqb47v1O0G8kq9qIWx5vcvUCc\ncINfdqjYCl8CVLWvDkVGYwGhRMyJN0rOzhdPtpSeIQX/VZQH1zztjfmdMDUY\nnDTRmBiD2gxFOUv4KRgOqG0t95DQK7lXYLzEopR8k2+jdemJ76JL9RwABdN4\nlgYfhvLDMFtziUBNL4VbVKMs1C/aqSA1s+z41RatLL5b7sbJj0VS5xnK5/tA\nN9b0/dOKIGpfItoHIZLRk08vPqahqEV2I0B+Yjb/I/2n3xfAlTQbM19JRcw1\n7FQE/Xa2pQPZJw52ZNLTyt101ZeVvi53Y1ODBykXtCvj7AwQ12fUcMdnbLiz\nmysr9LdoFYfQtmh/PmFdMO8mn9tO0Er8rpH/k1S25uWx/Dhp8nXoxlwMejF6\nVQzja9Bs8bL+yN5aAtlSy6ukAvnDi8mnu5WAaK7nfjWplQdAvHGycdOErtAZ\nz6tzW7qM/Yn21zC1N6n7IXT48wz4XQVfR089tr978Uyb9nbmyMCqQhTngL/j\nXrwY5Qi4s2ZsjxUkAzySGS/pF5DXyYNWOQCYHO0joXsvgi8loBZgmz4JiGjL\noNq7\r\n=hfVx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7DKZCBs3cUb0PhSvsgK/nZwqGdflbUVQtACuLaeEtRgIgHO4sjrmedlovLf/L0jDaAapfk3gvH1TMnEhHh9ZMAaQ="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.0_1563726929472_0.9793855432993839"},"_hasShrinkwrap":false},"4.0.1-next.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.1-next.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.1-next.0","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"9f5b51feef80a30c1048174cd38a4cba0c98fbdd","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@4.0.1-next.0","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.1/node@v12.6.0+x64 (linux)","dist":{"integrity":"sha512-jed/y+Q1UgBLyO3KHNaF7AD65oCAYKXy4fYbfQlMQ2m+YsMODBGAA2Xumwug1ugATGNfm8LltYt41Y0catlXjQ==","shasum":"b8c1ec44acaabf98b89dc0003537d25ef4123d50","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.1-next.0.tgz","fileCount":16,"unpackedSize":129989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNN6KCRA9TVsSAnZWagAAs5AP/jvZCwxieBZ5Edoqj+P7\nk1jqcGkfxAX6H0/3QYSIb4TS8jwW3PQfcMr5jlKpKxCAiWcqKPkc9sUU20jU\nkA6elYBEG/aYv04lPM+VuZZiAe0kmLC9lK7lOz6bRje/eTfGNHDrdc4TBwNl\nX9AHh2bmkSBFdh92ZNQTdpAxjheau6ans4JgC1N4AtoV3+w8nVzmGEb9SVAf\nSUuvfSFDmsVZZ4h/ysb0YoIdGhZRmGOvX72yZ5iawXqIus7RgafK4Oc4pTYs\n5RxP67S+ux67D65fQpBBflpVNZKRlA+yBdUaczbwKMmMLPfLbEnRJHF3bdal\ncplp890JQ4ydrMXeMRi/CIwZ/UtCF7eHMzHHavf6metp00IKakHXXFRriuLj\nxmejmbpb7MxWjJzBF94wskvplQHb87AGvou0Hgdl98Ozy8gvs/PmcbtjMHJV\nbHCGmNdsTiywIRfUt821xTDyOTdNaxmGus/nNn70x61L0FHyEzUWJTV7x3Vc\nrexKtlA36uBtpkCaKIfhIn+6pqD9ulENz0nM8Ti5R4cJYMcuRVYoD+XLhJaW\nRuibfOLpmDsWElxNNF7G71SJhP8iYg7IjbHvmkVKYSz79Yu/ixWkRR7Wx73t\n9w3IWOND7CB8eSQwA7Xy0qgTeowjRQ4L/FUDBzhV6KAFtKbiyIXYojcWdqAW\n9R36\r\n=tUfd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAdnbvO7DD5tsslLd5ZnVymJpxBPNqisPHIaN/U+c7zAAiEAgA+IUKVSdj2iEi/qA/Pfq9ceyzV5YLP0cGUj/XO+bBE="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.1-next.0_1563745930101_0.35953233068306756"},"_hasShrinkwrap":false},"4.0.1-canary.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.1-canary.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.1-canary.0+dea500eb","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"dea500eb9136b8770c8e623bad0e179b76f21dd2","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@4.0.1-canary.0","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (linux)","dist":{"integrity":"sha512-So1ZHRkH4vC8zsD2AlMhyxvo+skNPMj1GuIGGWyK/eyFXd3eIKO/EBkK6lHwC2UX2wxSme4ESaQC/w9OWBOxXw==","shasum":"7f56c81ccb9018f039e3b17c505604dfaa01d79a","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.1-canary.0.tgz","fileCount":16,"unpackedSize":130011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQItpCRA9TVsSAnZWagAAVXwQAIl7Z8SpkLDb4g3fzjae\nI7InKjG4hq21/+GQbxaOw6NWoS3QtO69+HYn0zgyPBXaO29pTRgSfvCcmz3T\nDoZCNEG2tBYo9JbVA5UUj1cFEJLM9WKCjmhuMVGesgReDmAIqYAZyS8C/cco\ndAUoSxOTrox5+31sV+UEH70ZFyETGOl4G+3Fsc1qRyZQiSYkSuv8BU9z3hZL\nNbqHkuWAOS/3gPdBEgf9BlNSM87xX5lD5xDjvoM/TrjKpASl87ILxEeEBPcA\njsIMf53wtm+e32tW+kTcu6xHpxJcl2x6V3ELug6UhnvJVlwXQpb8yf/NYyUG\nsqIC6LmfK0CKEQyazXNkx3nXJuXnz4DgjSSUHxRM5F56+SrL2MqxMUzxDX4A\nBqPTX+IllN2s299oFnEFvkVj3Pgq2RayleYPADB5CdR7z4p2RHUC7v+FSf2n\nIvaptYehpPBcHD+AJTSOxA7IPz1SRDsUEifuj6tYtyOBboBh3zPT+7mZ2T1F\nJq8DdocfF/atroj4hjo+b2bnsWhuM21hG90e8rkkY6As2u4IZAO0wl5to5me\nWyuJJleyGlPYngOc+TyhsdN2aFkUzDR4ak2IWatj6H0gVVhVVN4RvaG9PY2i\nGN+1IYvDKD3FsnYZEZ4Nz9X56jEu7NeUsPlhxpmNT/LNsiHmQEreJwNwYSTn\n0ec3\r\n=OcXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr8G2eZaJodchZESsjowfNKVJd5TIEA7oniKLgUUDnUwIhAKwPxXslqYL6LMiomUpgeRwHFD2Qkp5/mv5HTxX5mPJQ"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.1-canary.0_1564511080538_0.8047681584945852"},"_hasShrinkwrap":false},"4.0.1-next.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.1-next.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.1-next.1","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"cbc88aedc74949fc39b3d520e81111c3521375f6","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@4.0.1-next.1","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (linux)","dist":{"integrity":"sha512-cJ8r/cJZncOThpCY+Eqvudz2jUD6XFFss78yFlQdeWqPEVq1Hzn6SWn9IQPLY3Y0LsxkVAQOGU1Y3HPzgfeQ7Q==","shasum":"b694270bdf9c9736b1130191c3f40756a32b8caa","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.1-next.1.tgz","fileCount":16,"unpackedSize":129989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQI6YCRA9TVsSAnZWagAAMv0P/ir1ZprhHtpxYjjLpaaW\nwg7V28ckgDXVypZL/bC28S4aFKjXp6i/+z8Cd6gU6XDqZUGOodogrfPwU5Jb\nRzdijZ+npZ/uTVN2DUgmoBwvrpzrLsUPxruAAkx1f6oiabDkORi3JIOPgeP0\nHwDeJCSdw8oYlUZXkwXEpxLiTByYC2N7vr/Ho1ehQDgSUbdKZAQXIH0CAPd/\nbt9EAGQMLl/pWmgv4P7CYVp2pZex0wD91ma6EL+wAqVshQLUkhVr5arkjXH+\naVIfxwkcbcWRNwnl0rkrizxp676U/ynvclgelQ8KlY9zUVaLkLko/Deds8wi\nY2JKNGqKMEBDid+odEc4tMYFuxW6zP4paW12+qg4HPg829EWtWIE5Zb8MY+P\n9ypTnINgbBm7GMMO4+LTjVpEPu4H916A1zYuCSMIZ+GlnuOSzaDgIz7UZ4h+\nmABb957tb32OeBu8CXj95/9RVgZJepDVUT1BCZRFHYx7qAtYK4rb+zfohy8N\ngRxq+keXWMtM1t655ExFY+S90XyASR+8bLy1U7cpbLtEaONwVjc6IlZUTTiG\n/gdmPzCcxCPp5IhOBj6Zg2Eshd+FgMpwFpTmmWoe75bjwP6M2QNJZEMnfiEw\n8bdrRH58/rzFBM2QQ3P9PxX/qre0SB5vpDXC/+noDENvcJ37JaWd50XZ7Oka\nX7Er\r\n=NPsy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8uvoQBD8VXtbiEYhO1rIgTkSZtZ/aVh2XhjS1lrlzZgIhAIlCG7Wk901eBp3MxxgA1OxNKfbtCDTqPLhfl5Gw3Deo"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.1-next.1_1564511896214_0.8992124434545117"},"_hasShrinkwrap":false},"4.0.1-next.2":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.1-next.2","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.1-next.2","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"56c4d45cc2dd8a5e68f892dde8b9c018c78f5fa6","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@4.0.1-next.2","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (linux)","dist":{"integrity":"sha512-MlSAFRb+vqwbBHGoACORIG0uo0Q/9d0s6OObEXV8IKLClcfftP+lmOvHAXERoFaN94Gj0M5K9h9MpgtOvHzVSQ==","shasum":"bad07ddd676b1854f70e867d7e6859de7af1e5f1","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.1-next.2.tgz","fileCount":16,"unpackedSize":129989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRZ7qCRA9TVsSAnZWagAADuQP/jJWug5R7zmKRgnY2EL+\nl9MiF4QmHHKlBwG7R9tAxz9gQa3lDIw/9It8odIVU/bghDkeQ48YU8mmUMJl\nWyVPa6BFjDGOZh1w5NpAQlo7zNskiI4GIV8FA6MoA2W84r1LVsah7/wVCmwq\ntypLdIP3MjXhS4PufBVa6Sfsshjbrf+f2zn9UYiT8Lq5ieyrLVHy1AbdGABJ\nFsSWpwRa31qdFY3d+qg/dtld+cXA/SSGzmIijFhHohKf/BnmWmgHx3BPhuOK\nnFZOdXld5PMkxWockdR66oc3gOPJZgdWR1JU9YaJVRbeLbHhipWPYawTa2T2\nnk/xiBSlPyE+fNYsOhnSeVqe28Xk6oi4aRDQhVypXROwLE4zA5CPww+mxiCU\nMMY5IgX99kmTjw7SEXd0duPRYQ8XDBrRNGnEE7FswZlxaMpObnV/Tye7PkXW\nA6Btt06Mb0pBTvGQcyHN0WI2kf/uEtY4bFOvJsAF1Wkc4QXgwssnUMiPzy/Z\neG0pa45MgXhO5t4yYUDA+996MdlfDEiOL26Ezzf5wJQC6d39uVamACOptyc0\nBnSO2v4TTcGr6NQH/S6vxgxE0QbsizSau9zNwG1elFIY3aNbEn6yccpZT1u8\n9bzREF/xTI9q/zxM+5aZUTMghLeb/ispxSAAOcsiFIFAE+s5J5jMGyli8hNl\nT2rA\r\n=zzxG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPNfHj4THvvwr/Z8j6AvRDRTTQaXICExDuf4fRTkFj1wIhAOfWCU9svx/aqZS2H76xFCdO99tYMcY68Q9ujqK8eQBK"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.1-next.2_1564843753989_0.009208641545076945"},"_hasShrinkwrap":false},"4.0.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^5.0.1","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"e6e91ae6a760a0cc1ad4a5c4822a24df044e8fc3","_id":"@nofrills/env@4.0.1","_nodeVersion":"12.7.0","_npmVersion":"lerna/3.16.4/node@v12.7.0+x64 (linux)","dist":{"integrity":"sha512-bCoC/cFMITXf58/iApPHJykQOpZqjIf0LrYfgmTWB/hvsRFFbZaE+N/ZMo/vY94cBrt6eTyzxPkAAp6yoFay1g==","shasum":"46e42ae2a846d29b7e1e34ee0e42f706fd262f78","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.1.tgz","fileCount":16,"unpackedSize":130160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRaK4CRA9TVsSAnZWagAA9f0P/0NlUCEvTs78KQT08jfV\ngLe8GExj2nOWu5kOljnf3GeCabDZs8FcNmxB4QNeJevewqBVpsFBfNXDKdDU\n3+JqbGTBSp2AbI9g3fEGgqfWM7VgD9OsohYo7giseE0+UYQa7mvSCxzNBsEm\n+yDip0NSsoL8z3AI0D5B9QtJRugiU7zZd3fBhGOfP+0aIY2AO5cO8U7+/Tub\ngz8p/A4I2vDs/85wsgBPLXbdHod6P3tUJdYplXOeuQEp1yVxjf8wLE3jxMFP\nLX0LJcqlSgH2RRevLyrK+7oRi5dyrvYAShyQdHY+60DoDXbzd3UkQgh1hqCB\n632pRy386zEYxpaLq7N6d0nsT09shFGlU+UDJ5ohaPK4njVAaZM446/Y/10+\ncp/UUTGQ8/0yumjAozUnzb0e8xYTuhMtDcKj9ZgX/XC4XQP5lbGE3TSlPydi\nJ0pwVDdMIJND2DenOhfJMXThcnYu96y728KXZazKYr/NBf543BVnkuWNs655\nlSf4t4QY3GqzfEm/9cy2WPaYNPMJdilidfYwNKJJkBYxV1egsL+/5TwjHWcf\niqZEqv5Eo7MhD0YwzTendTE1liBT6QKSGodIdUCYchj2qy6vrM+ahKBT+Wxf\nr8DEv4/lllSMbQC4V04ndsNTwGv9Px3hxD5oKVAhf6fO1Cj6BxysBju4V9vi\nXFiO\r\n=TUef\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv1thNlq37SSW5QVrhiBu4FLkfbYeuLPer/hmPerMhEgIgVtSmUCPvUeNbbXNQ2ei+eX+llx3cguD/oEqOa7W6ZV8="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.1_1564844728142_0.11213145599396146"},"_hasShrinkwrap":false},"4.0.2-next.0":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.2-next.0","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^6.0.0-next.0","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"1c0ea21a75163c3589d194da3e7b6937772df9f8","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@4.0.2-next.0","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.16.4/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-3U8uaDzST6T1l3mSTUx0Er6qTQQYU2Oosxri3L8oUkI0BHPdTVsRrnHJDxn/EP4mbNnvJ2voSEZCNiYFvlRWNQ==","shasum":"62b44b57851bc202adc6aa442dce649c684ac0ef","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.2-next.0.tgz","fileCount":16,"unpackedSize":104385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmAtECRA9TVsSAnZWagAAhOcP/RglLet/SfJKqnwXbA/8\nnPM+zYx+FcSpq4QfV0ux8Z5axkYIomjSlHr1+8cZu5Acu6oN3XW3ALLmJiSe\nv8qxB/dxC1y9ZSfr7RF2yCpJy1/UYgNUOhhzk6jNhTD1nUivZJr52OzeiNnJ\n5Z3zMV2/HNOZGGGNo2tlNPFdK0huGaR6lyt3eG4Rp8GQ6UDLQD+ddpWJUd2R\nL2gS1AslkDjGQBkYOugqSfOE1z0DI2xXylnA2oUlqj3h43sfPb9kLXwJffqr\nk6oZEOEft/flgmP5lomRWyYYcgxzoNZ9F3XC1kIaHUEoJ9Ovr2mKuPkY20kS\nAbOojLqEZRYhDR6i29dfjfa/4ToCFiyLg5sW8AXBTNORMEqSJB2NGoyEAMiN\nkbXYbW+n/fl8fmpMUqLx1WRgccoAG3OF/4vjb1oeUGsRF6Htv6D5dI4LUdVf\nqecAkta3OPoiWQqzPyPrJYft1UwH1wScRvpY6ZQlAKd15la1iC7vlyl1kmY1\nrRfj9FMQH3tBkvGuLuOusJKYxOf//MV3ufwcNWZ/yZ/c1S86+N1+41QIdPbt\nzVDcki5TSIzhKF2zPs5CL0nR865t+f0pP+4HAoA0+Zme5lAJGrt+Hhrnw8Bm\nOfiFpTo8KPzbuPYyAk/+snSEFdm0HeSXXy2sFeLUHdVv8f9+wvZxTvb1akmO\nPsn+\r\n=jZx4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGEPvcO36ITqz3ZMZcwI/f8dVe0lTVxM/P2iNYDhTcuZAiEAm0k8yJ0mh+i1WD9CDdviSN1Vun82VT3vdkiWiqJfE5c="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.2-next.0_1570245443619_0.5912668209585024"},"_hasShrinkwrap":false},"4.0.2":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"4.0.2","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^6.0.0","camelcase":"^5.3.1","deepmerge":"^4.0.0","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"4607df15387c4934add75130e0901ac668f27439","_id":"@nofrills/env@4.0.2","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.16.4/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-NxVG6G49K1sowhT3/2oLkhCYEGomigY7D6ZFNpoOQyqgUEop6jzzLHTnyp1/hc6gYfDmNuNDpuOLwUfTkeL0Vw==","shasum":"3243caba304bf66c671ec95c04d2489f566bc33f","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-4.0.2.tgz","fileCount":16,"unpackedSize":104556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmAyICRA9TVsSAnZWagAA0b0P/3GSCAWdEeaTEC6ggZsN\n8BFvz7eR+JvLKVBONY/YK22O+UCbcIdtSPiDVZP/sBO2MVAKBKohZ5d391Nc\n/LsySHW9IUgBcSwV4/h1yV600IQg65ZCw13NqNQs3Izj+wreV+zEoSV9qqRG\nZj5ytDhNi5cN0pQoI3Z7EWN3iwIqn4+pYzQ7BkIz7QbSy4ajw29y7OEj5mn7\nE2bgF1Fnk9YOWmbb0yOSNy+LooccBoFFkFuYliU2+bJbfYbqVxW2iuyz5H1B\nxgvyBuidNAFBBevM03yF/j379Rx+MlFksPQgJwEiKSo0zWdBJFTpyJbDp+yP\noL2mCiXDIrlg5imrHRL4uAmJOHqWPuPs4e30vph8/5haonaLq+W4cU+RmWD8\nB1fchQk9olJ5ykBqrrd6t/aDDvkS3vEIY1L31NQJcE8GCJPlQ4+2f4xphJKi\nwRZOetsuzdnWQfev5YCsoGfU7Z9DMjzsN47r8wTxArSE+TCQBkc+r5asosGR\nEVE6hLaLhs4hjtXVxWJ3FOKsQOm3JUUNrb3f0I/B36ouw5lPKiLzmjktBk/7\nS/HOEkwObr8fzU+zYWrhLwsUeaIniEok+n2U18V86ZsovJ8+UoOpb68N9OpA\nkNNXSG6CahMforfA68elqq8kXG+pDpXJsAzDdf67We8Z3fRheDnWFjkX2BQD\nRQI3\r\n=N0l4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+OCRr7RcxA9Xfhp8Qz2kcsx870++/Yrq/D8QPCXkaOAiAs5hegLgEe5p+VLf1HLr8RZM5TXnFMSk5+jtOKavM5+w=="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_4.0.2_1570245768283_0.7103632330102068"},"_hasShrinkwrap":false},"10.0.1":{"author":{"name":"opensource@nativecode.com"},"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","private":false,"license":"MIT","main":"./lib/env.js","name":"@nofrills/env","types":"./lib/env.d.ts","version":"10.0.1","bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"dependencies":{"@nofrills/collections":"^5.0.1","@nofrills/types":"^6.0.0","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"gitHead":"21ff1ba745baa21c5d6d34de36cd8fca42adb576","_id":"@nofrills/env@10.0.1","_nodeVersion":"13.2.0","_npmVersion":"lerna/3.19.0/node@v13.2.0+x64 (linux)","dist":{"integrity":"sha512-D3zcXC8ezO8Oz9og8guwIx2cPmdN4URWTBjedkiBe4Iepkl67y6nKH+QajpAwFKwxko989LBOrmf5DwHYr/aXg==","shasum":"2ec0c1b67cf2bcc4477aa5e9e4440ab66baf722e","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-10.0.1.tgz","fileCount":16,"unpackedSize":132026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4wCkCRA9TVsSAnZWagAAn8EP/ju2EfccaXLV0E4/VeOv\nMOrLyB8wEWoG8t4MFrI7IwiOKDwrnLVidj+B71LPRj9uhetGkQhWKa12Hkzo\nJhz9A5r7VUl0BmsFwkwFCn8N2Z8WeEntlHdwpmxjO588tCX0mkbLf4OMRqlx\nWUPTHgQAKkyINEb8pqxiMqaptOxn/teymT8Sox75SKI+cARvFt11oEYA+eMt\njWTjcHFElfHHKtVIWKBMgD4rxv4VWtLCQfwUOIp3QiVg5d/kM5Gm6qMjJJIR\n0itNMacaR8FUv24JI93GyDBny3s6rHwZQ0Qxyl9nwnI5JFTrxys+7a1aPK4T\nSB7FmfQ3mCl2ldnEItgm19Zi8CUPnfTV+Vr7bLDgw/+Z72jtvdF43qmNj8t+\nKfbr/MJtsaetilfGbBtN3ie6cjwvNE2Ys+a1mI3FMp08XYKrO0wM9d662gpB\nPJHQ3R+DiVWz0qZMXrK9vFGtcsdQzexWH50czlmQsXgelaDxgSeGKEQv102t\nAc4OJ94p9FFpJoMqPfut3sYa08BvR2eZqQKSD0ONou2dv2Z/us5R8zla0nSg\n/6+MlJY9nh6kOEqVaYezTgLf6fkcZ7RJaDva7elHTjkrT3XzUECu/DRL8D5U\n83FkskspWu3a90w08h7SN7Dh8icHlkOOB8px68wAfVYkrzoD8I6zbhseneTF\nrTC/\r\n=PGiy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBzgdxeFvMPlMTxaeSnyeGVB7BqNvG9hEcfQHfTSyBQgIgLVMYVRLHRVtGno7DvHHVZGlxA2qBknr69rITH5RIA4I="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_10.0.1_1575157924310_0.582119705660745"},"_hasShrinkwrap":false},"10.1.0-next.0":{"name":"@nofrills/env","version":"10.1.0-next.0","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/env.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"ffbdb48979abe725c18085c3db469190d20c46b2","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@10.1.0-next.0","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-7l638ZT3UiGQBFeZOo9KSMbnllYMODCe5oWONYg06JD9OJtQ5IZPJQ3qic32tunpbhNdHz69rsR3p3W3T4VtCw==","shasum":"ee87834f53609fde9be5298f57132663b7bbcaab","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-10.1.0-next.0.tgz","fileCount":19,"unpackedSize":21951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd79CWCRA9TVsSAnZWagAAeTwP/ioV5KLqhNcvA0x7W45T\nF/ahWme23kFbdDRrcmjas1hVnOjTdHGHSRGEAkEwJYsuWed1llnDKB59JRQT\ndYqVpIg8ugVC/Ya5MinMecEOXOldHRfzzO8grzMztxwmMLd8QttCns3O55m9\n+Bekb0rPAYnLsu1HhP3vP/WKL4xQvtYq0JEsFDdvvJO6iZe4lu2N3CDhiEYj\ngqDPNeoSKQ6nz2ynmgq9Y3fWOjLWWyz92HQ2Zy++F7xGqkTs/4MXOhtqLlkf\ndld9V3Q9wcsSax5K4lyVsyeLpvfVFJMik+oBOglY20PFZ2sGy7+XKulYrIH5\ncEiUxUwZkZEw12IvucQR3oONNonQNDU+2n5yNO8WpcIPr42RMEGdaZuSwo9o\nLRqVYnUbTEKN7hkwgsJp/g83ThUQkOUeO08t8FM99PLZfRW+5PNoRtSoUfpr\nJc48j3q8JBOvmyz6Dy29lmX0zUM9qnCR7i9eHyoWR+vFZP+hVcMHLGK7sXEQ\nFkO6l5pJepfPknJ65CRMbr+Vc6fXcNHKuFwPbjcnfGAChL77jRGcYsy2TlRI\nLn87AqmuAQopPAUyi3RySC2U93WUlEfzbH7fMNlKYhiIiHHjz2mOMMZoaYeK\nAqsD/mS0KfcChj6mFZzKCfrdGLWCqGBqkurWEJCy0RcPbVLwbOobHaQhBBcJ\nZUCb\r\n=TZEW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHf/tswf1GDXZUPAEIvvvIdntR0BPH9rs3VsvIr86RMPAiEAmIk9ksFixV//L0gdgTGTweJemqzUIrUcqmpeneITO2Y="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_10.1.0-next.0_1575997590357_0.7562178894602003"},"_hasShrinkwrap":false},"10.1.0":{"name":"@nofrills/env","version":"10.1.0","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/env.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"2b00ca04e40ee4c381b90fb860b1ffbe4c50a071","_id":"@nofrills/env@10.1.0","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-M/CJ1bzNdGdeNSAWMSe3c8nWhoBCDW4WyhvvriuRdoRXBZZw2DXJSWjODyPDbO9PdO4xV/smu0pMjzODvxSUSw==","shasum":"7cecf353f2edb78d6dfad43de365dc87bf2a43c1","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-10.1.0.tgz","fileCount":19,"unpackedSize":22131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd79G2CRA9TVsSAnZWagAAxykP/iG4QkL9I+K+8UO3SzFI\nhR0So5wbRp6yuApyXjXxls92Zo0wOcELaYvlURHPlF9pk+UgwJ0+sDUmOQaf\n2/GYwvtI5jidzJXa8hKU3BRHJ+qZUwxzFsS5KytHrxCv5HU0r0gnFO1C5yWL\ntH09uEHuXxbveDYxu2q1FeC8XXVYrImmu7lLeHmbyC2Z3QObU1FJSnZqByBG\n7JCQOusPU3GqXQp41EIK9WmBm/zn3WirdnhpbGWeR8J1HEyPSWHswES/kIVm\nnp2TlceruzjhuVhtso5eE3xgzDtYaceye1a7hpe9CZiqm/bRhGCk66DExv6x\n+DQP4W6ZssZCCBgagG+FPVD7br0hHncYR0NWp9mw7r5gcBqqVdptyKlXLuew\nOmrLUTdIfp1Wc4bZLbJZauPHXF5WE9O8ZgtU+vHjkPDkDFz3z9akeK4eh10M\nzj+mrx4GrlxyRAItqa43j8xduMztuiwAe0qwkgtMlgQlqD9VOOJu5vpr48o6\n/Wl3vpnb1BBej8AMKYihVcmXaM7fQ+wfRSYOKrTxqocnx23pu1ODfPpijij8\npZQ21aLmNBmonJ5f7xk17JNGwDV139wNurCpZAqyWm7e+lJEWbdSAxORyPnI\nVdc3DrBT+tFbh8Ozf2pgWyd0ye8opx59ZPir8bwrtyAvpDqo1ir6eIp+oMPb\n9JFz\r\n=iXPY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZlHdyuiFsr+2OCJgA0AsWpJ6Yab4s5sI/Isd61Ha7HQIgQM2KLwU2+ZLBHFmdsT0y0nBwUI/GKrDQf/4Nlb7uzSE="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_10.1.0_1575997877877_0.7588483549178893"},"_hasShrinkwrap":false},"10.1.0-next.1":{"name":"@nofrills/env","version":"10.1.0-next.1","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/env.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build","upgrade":"cli-tasks upgrade"},"types":"./lib/env.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"4f36634e2ca21599cbcd44f973a75e5a08f9c8cf","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@10.1.0-next.1","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-XZP3jxvsZBAap6AB8iX/lZpbswJFyUBAgzDBEvEUFXtqqTjeuLWRO8TU9nJClaLkBlvH/D+YCCPg/GBm2x+r7g==","shasum":"ce347e1263d7862c59d242fbb40c446cb5d4fce7","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-10.1.0-next.1.tgz","fileCount":19,"unpackedSize":21951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd79LVCRA9TVsSAnZWagAASs8QAJRk8BU7fSp+H6p8hXFI\naO8SYfwElh57lItH3wQYS+jS1teSO2Gi3XbBw7Nzhzflvq8kGvjj8ZMm+Csk\nKy7nfWxFzeUz4zm5rWnR+cpx13t7kt0fyeFB/9SgGh1YPOMSgWO6lZHOzrYL\ne0g3N6qsBueZE/WtCscMLq72/HwnUbdxciAQCRsa6fy/3Q4JMrjX7DnuuNI0\nznSdgL0OgbAQcpstm3AFZeuLyPMjJe4Pmww0DoQIu5jQUjR8noKmnfFEMphg\n4V+HcUokipoTkFg5uYVTIoJ4249+mXftlL1sjJXR+87QWvf8TOgn/qS3AcK2\nELu11w2C6IjNHRR0h77HdcZeuLbo6VR86RufESIFPweTxBqcwH+X/9Z4g3yH\njjWKQhN3K2P/UJoKiBnxvyJPg/O6wzO454v5UFRYmiwAQ+fGeo/dVcWzEPBL\nNr/YJ3pGY9fbi1rW9mXM+OKr7fQKgSqnRRHWwzkapMSf6lvRR4TzlPplsTfc\n1IQP9Y4EpmONrI2V1gfDOES/HZ37brEc1kNaqBeQFyWeEEA59y4+DVZEeR1R\nGmtUO3LI9txPmRWc1i/KWoBvuVuAxLzxM4XTlmPcBpI9qMn24OJSQJhuEkhs\nfPoKP9I8pcjwAItT8GPyVRXUUTHM3anGKdpK8q0iD8Yvge7fvFLeHiwNVxkz\nXbXO\r\n=Jfi/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHy9xyHHnkOMLeyWaRNY7Q9QTCW36qYrBHFVUTuSnd5xAiEA6E+Kg/uMX/rq43t1POpxF5o3Nn2bL7nJaiTyqN7i4Mk="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_10.1.0-next.1_1575998165015_0.8806437454877847"},"_hasShrinkwrap":false},"10.1.0-next.2":{"name":"@nofrills/env","version":"10.1.0-next.2","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/index.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build"},"types":"./lib/index.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"8b3ab6f227e7a695fbce1fa80247dd0479451a15","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@10.1.0-next.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-jawbJ4d8DZ8VEqRzeLZs7QQQUvdwMd55USCYPUI79S2SC1hbHuD6WONihCPAs3gf7IOva/RolHCwN011drQGng==","shasum":"c2fe16f25b76bc999fbb50223694da22cb43aa7a","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-10.1.0-next.2.tgz","fileCount":19,"unpackedSize":21992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7/NXCRA9TVsSAnZWagAA+d4P/RNnD9rFlb8OuDykwbpR\nXpTs4MXHmD9wEE4lsgwJV8wU5J/48TvGyovdlw6suEBLLR7TJ0pgMzm254Jt\nW6F3bhUKIBRVGqHaVFmTH7ZhbAuen+BTSDyavcjlpXZnz4gzDi/quD23msiy\njGXVoknX3o/0jBQtYBcT97xCRhtL/K4UhuTiGoDiUblsSd3b6rb+bGvh21Ly\nQwTXAYQvFN3w0w8VKf5XTu66O6GftSd3dLU4SyNTTzSN1/lznEhQ6+5Dsytl\n1xNJHA4osav9fp+9s2uvKe5mV6DfJxBBcT65WKhQfY0r+lh4gz9VVhFmfwAY\nGtQXD/yUjiScHv3zZzGqRwOT2xfRQlio0oWzC+aYuQ7WJxkFiove+O5S/9RT\nSQeBTmsWw4qNQO/RamUzg04gZQbQqN7dS2ehN5aq3ZJCFAVWSl96JgtVTRWr\nHafB16JNbI7lSrFcELgNEjeox/hBlMu5l1mIzRLrYltxUGdS5QMOWyz/gSzM\nueb/hNWioLDk+csrwuSUm0LRmaIS7eVng5M76cpMAx9Sod43zTAYCH8k5yoG\nbfRQVv5SjHqDWYb5HmFCIYv/IC0vwUBpf9lSRoi1/ih5W1GbwD/mNoAcZFQd\nKtr6cucdcHfMZOKFe4RYhgNlh/rJtQ0Jmn+Uz724C8LcofX+3ifg97aOexrR\nxZpf\r\n=5Hv7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8Tr+UtAO9A0ZhKXFOchodJ5vBkatoX27Ot8iorC80RQIhAJbCqUhPLjSUTA0iECJaXFb0Y5L8lRIC595dPcTAdpzV"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_10.1.0-next.2_1576006486823_0.920761379829435"},"_hasShrinkwrap":false},"10.1.0-next.3":{"name":"@nofrills/env","version":"10.1.0-next.3","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/index.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build"},"types":"./lib/index.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"376845e995eb5cd1358d41607bf124cd18d2f95c","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@10.1.0-next.3","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-UuRBXqA/ZT1qvp7c6s3W/naYH0zlQIyrYE2x4QR4ItWCl7U/EAmTKuLLJY+5Q6PYg/kn+Mg47x7FmQM0DHfNjA==","shasum":"2cd4f922eeda7b9ef04725fe5f9c192f9f6bb647","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-10.1.0-next.3.tgz","fileCount":19,"unpackedSize":22179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7/i2CRA9TVsSAnZWagAArQgP/17bBTWz6ZaPWbEUssW/\ns67uFRaS+/x+EY25IdOPLVwkxSDlmiMJpCOjXxkC/SEZqzzXGBcbH2+e7oxV\n/tU9F+obIWrt6xGNji6+GbZ40PCON2zYlspNGTUsgZZECJSnaUdeMMxk0QAu\n1fb9cspnFDZ0Shk3ZgVbORnDTXWuHt139SsUMuJ8zTE6Oy6D9yvDSxy8BLsI\nGf4p4z8B+G7vhSy/+TEup3T9v8VuF/jU7s+oirSR4AwdYzF5drws2+bu1ZMv\nxaLWCtpHu9uvHhzRZvenzOvOCtxq1qks/a8dJ1jNznWPMREG0p/BF3wAIXjy\ng9cu1N0PH7GXEK5xCU/ccumlFIcgkQ+xe3UR42LAGzYnbY9QbbcRlznDpBQy\nfpihQp9s2SnBpGguJxDfagoiuOKrNBprf29ZZxHKrSVqe2BmjowRwPP7ES75\nxBDnhkdiAf+1cfugJTvTGYvJfPqbG9EZ52rsQjKMjIZ+1WjkrqUX6ADJcNPl\ns788j/7lT6Rv9TkL7jbVwvU9el74kXwGDLEQl1UGxWLNuI4Ih1/h39Zrk4KX\nJPXEYgccd2pPWBPKzlZ+6frh/FY0DHJ7DHSuxPEjZtZ6banXcq38AWBWedNm\nB2R1a2k0zQoNpSyq1EdpVCKzyROD9U37cSrEy1w3oPsRvtMKiDHwqU5zncSb\nwy3V\r\n=+dCj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGLf8uiWVV+lG0cb1Z4UiTVisAfMxKF6um/0OBumPwoQIgTPLxRbyIbvfiu/lU5733q246REtdkV1ysiNf1E3DjWM="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_10.1.0-next.3_1576007862176_0.2756401979592842"},"_hasShrinkwrap":false},"11.0.0-next.0":{"name":"@nofrills/env","version":"11.0.0-next.0","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/index.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build"},"types":"./lib/index.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"629dfb02eb657612c15238dc4290e4b2929714d6","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@11.0.0-next.0","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-JmHT1PI/YXWhkFeERFT1ku1eQIBDR7JxCAJ5TsHHLUC27CjSkNf5Zrq2r1A/GHl7O9ls5U66UYBHw+4ZXiraaQ==","shasum":"a668c4340789fb15fed3b22fdbd6e421bd1214e7","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-11.0.0-next.0.tgz","fileCount":19,"unpackedSize":22179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8D/JCRA9TVsSAnZWagAAAMEP/0hLPpAowGwPnmHLPP5a\nIC9bnEx2Rk42P7IRBFy+9Qz/+qaGWE8a4oQ9xikMXee0VDV99THfsnFS5jrw\nfk5W9zJ10areotln8h5fIUM3R66VRE5ylOgsDGbH3gZFqe2EzXKsZ2k4a9Bb\n70gAMj0Q8UVOT+V0xxYcdWNzysUq3MeX1LPLBRmVR5gs/2bDEebkNCPEVGtU\nan4+s9GdeK8LbA7cyW0lQdZnHlz0uzHYWNu/hU31CHErOD+EDs5QyEGI92K8\n9MJpalZoOBymJfeT7y5BDNt21ozIeW9PR3bwa6+MdM3/E4gIS8crvz53TUxB\nCUjmCgM+brWvLIb+FpJ1topJP9ARLbcPoQ8uYkHYWOlL/sIT7lcip7SUFSBb\nwESgU5PADXd2KTaCCa5W0lgi0LaRFjz6t8Jd8ujhHf36VVhebvciE7ZFJpq1\ndDz4LuM2Suikhh5D5tvhOwaViP4MPjUL5n6bgcrC7AWdB2kSvIXncsMJxNqN\n5X4De44oTfR9cKBo6Gvk2WKEOuqhu9pi6/OlQdG7wTUdlwbSv+lQnv61h6c3\nPt6HO7dnhG0ezNGV7Zb0Ar1o1Qug6zekg3duKpjkFeG/hEDxWfeK7m3QlXzV\ndFEKMKZtNpeLHMnSrcaJjwePFlFUcMBP8BRprCrkltoO/r0jqHrdZFySBQv6\nETYz\r\n=gzv8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6xX19zJs1LQ7yuxusCsRRUNHIZGV9/DaUErZgiHuHkgIgZJaoKYSM1MVXF8TxFeMjugxiC5dSnkiqCGFT0/XdKPI="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_11.0.0-next.0_1576026056634_0.4754313795516656"},"_hasShrinkwrap":false},"11.0.0":{"name":"@nofrills/env","version":"11.0.0","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/index.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build"},"types":"./lib/index.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.2","camelcase":"^5.3.1","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"faaf431565c1713bb8a4dfc7336c2a4e969e1410","_id":"@nofrills/env@11.0.0","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-GymH8FjCK3OWlFbNPnjRzdu1xkyueQigrUeL23smJCSqE1+BMIBjnDJ/inAee5+4fhXpN1CN+6qRovaMW55ZTg==","shasum":"18ba24d2ebc2887f56894fe4b6894b4437e9a16c","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-11.0.0.tgz","fileCount":19,"unpackedSize":22359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8EDeCRA9TVsSAnZWagAAvPkQAIJbC4hJ9AIfOMxNw8si\nv7mIk30G3aJ7J6YQqObqhYVpeTXayDnQLg/8Ee+Lgrv8Pk7m/rGVwGuT57NU\nEkEKM2atDtK4Q2etL4VXS5xncsMJVEEC+/pS+Y7rbHbGjHorCif47b8weCNu\nlEMuIJnKi+UvLug+HT3t/cacR2/DkDMonEpLX5/0RCMnmHhSp/nqeFQvMlGB\nNwYrLxKuXHutCE/M2Jr/dZ+0FuO0sE/NZJoS+O8H37nn8pPJFaAWHTSTqCOg\n2bDU6S59D+NSHVFzqv0j/IoLznD7LsiNLrg/HDFT+eF3Nt+xAgVxBXkqLZPU\nCj86DbvEaqW3iNgbiT+FEzkCcgNs1no7kB0Ajp5fpLjbkOEs2W51GcIrxCyA\nDSx2AeNztMr4i3Dl8rLG6rlZybFPcr0zzJkMinS0Xape/udEh8luyL6E2U4s\nYARjUhnsTXyMM4a0cBTbLSRDl94AE2qDONnCbvuX2sw190ofG8KUhS+4EvQB\nmVfUcVuP2XZPrqrjN4xSY9z7ssYupj7Yii2Uayri+v6935uGljv2lGP398y+\nbYT6maKq/BwuXZluptGzDjdJDA9gQPPPcdusAHjxFop6ucSpJFjUgOaG2bu4\nG4SHWedyl54/FG+rV5Kolro8gS/G7oIRlXLK7etQSYj8RRC1RVM+cNFFPqbD\nSPTb\r\n=cLUT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVVa4epKLI+SKGdzdx7cVHbzCXx2uWZ6KUmxFKjV0ZFgIgOsJlWujMIFfd0FRrWHaKmjXrkVH70x969sAArm/xv/g="}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_11.0.0_1576026334401_0.6151081088943782"},"_hasShrinkwrap":false},"11.0.1-next.1":{"name":"@nofrills/env","version":"11.0.1-next.1","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/index.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build","upgrade":"npx npm-check -y"},"types":"./lib/index.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.3-next.1","camelcase":"^6.0.0","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"8985ce0ffda2662022809f5618d1049c85159236","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md","_id":"@nofrills/env@11.0.1-next.1","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (linux)","dist":{"integrity":"sha512-vcYiCXMJHHGXmzIdWrG9pBoOgEmQOKDq+tVyumLZLawwqlFhOW0U5A1BF8CF5z7DE3t8UJ3ql5F4S4OX3RRwxQ==","shasum":"cda51b21414901835bb819e227a94d6335d5371c","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-11.0.1-next.1.tgz","fileCount":19,"unpackedSize":23071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3xP8CRA9TVsSAnZWagAAGkoP/iDYBPVK6CdFREU8cNO7\nLFg3HR6XWNFmuF5jpzmN6EpxtETh9YaQijs4/a1NOpCm6AutVRLYQtUoTMGo\n8w689zae1clCVg477d0RASuTYw21WXpwKJ892THNu9E9FWnkYVRte2l/9RZN\nj2NlZrpnHwXI9p6HW9PqKp87w431jAyqT+XeShv4Iyd89YKFzDE2zKklW9PD\nJGyFbaxEZxutFTvbD7Wn907gS64kCmW83Dcnwp+tWK/OIIGiXyTPmwi+F/kt\nRkeEP3c8YL0Fm992hKshGX5n5OC0EouLlZro+YXl5Z59EmX008nVkRvFqPun\n2G4F+yF7EYD0jthFfmNsGevfRIDAcBEExIzZ3BUvLVtUa4JDatfbk47KMnPK\ng6V8GSmbopPKuqOXE8CgI4PH/Ht7qMzyuQPNISKLTzUENjX6rI9HOXgAXv6q\nQKrvy/9HHOny7deUxDNJU0mwKlqW9QGPz+EDeGeaEQh+jPjZG6CktcShU2JD\nJvMT1nZh3rU8dR0xe3yEAt6sqn206pUQ93kQKqNwRsgn8u6ML236YW3zT6MO\naQ4gBWfBaeMf+OXawDj/3dUNIfsT9nl/PdqTQqdyhpVmBvQtumq/XBH0lM0t\nkYhGeZXLmT5D36GxEi0nJvwf/EfOcHtNUF6+DE4PjFTOvdPHnW+/txoVfvWl\nFqa5\r\n=tiU2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDke6J4c9ueBmbn6NBJw8oqsR+SrBPW/2yjQM4+BGzAjgIhAMovd4ICh/pqkZr/ookZmYOFBdZtzJxtUzvkcvm0RQ27"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_11.0.1-next.1_1591677947688_0.5547588194440434"},"_hasShrinkwrap":false},"11.0.1":{"name":"@nofrills/env","version":"11.0.1","description":"Provides a simple conversion from config object to environment variable.","license":"MIT","private":false,"repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","author":{"name":"opensource@nativecode.com"},"main":"./lib/index.js","publishConfig":{"access":"public"},"scripts":{"build":"cli-tasks build","upgrade":"npx npm-check -y"},"types":"./lib/index.d.ts","dependencies":{"@nofrills/collections":"^10.0.1","@nofrills/types":"^10.0.3","camelcase":"^6.0.0","deepmerge":"^4.2.2","titleize":"^2.1.0","uppercamelcase":"^3.0.0"},"devDependencies":{"@types/deepmerge":"^2.2.0","@types/uppercamelcase":"^3.0.0"},"gitHead":"f61f99008372cf4b13fea0922c1035bd568e4d85","_id":"@nofrills/env@11.0.1","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (linux)","dist":{"integrity":"sha512-EbJ2Re2/nnByna+UthA1g+ljJF8IQFeR3Lwl0tHnMrleLfmP8f6NCldDH6LbLbC3bYxpJ1YW6NlqP9MBFwu28Q==","shasum":"17fec45bd4d4ea043c069f1d72d9f92c3572da41","tarball":"https://registry.npmjs.org/@nofrills/env/-/env-11.0.1.tgz","fileCount":19,"unpackedSize":23245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3xYvCRA9TVsSAnZWagAA0PoP/0gv17R2oHdlLijsmCpI\nX0DRTnUucdCEIF+4CxmTQt4lZWL9HKmiXzwiFrLANMonBbVNZISEFIcWBsEp\ncyAFvukbti20Z+uiWUzTBGefE1JIDiXraVb2RTCDQijE3w0P1FZuNKN+ylWn\niTqfuy2ZIrNs5m7JEuTvx0nLd+CSN7dsw8xtgVMm4kgWmT/TYL8C5pox0mDj\nn38sFHw9FVXxsMkYq5iBnmf1Mlg9rGnsWeFo6td49ariWl1FZyGC31O4EbFs\njJKh9/KDQxNeoNR72aAgPpn4nltwdOS4x1SP6txn8w4WUZV78GJ9Nz6HOTLt\n79/hZhdhVDjGC0b7xEg6XabnzvopwP/08J9wLbZMLo5E/0KUVv1W0DCtyz1K\nTVX941oWeTOyx7Wwyroej9MoE5jTT6zHrcclhGGTk3Yy+NEeHhSGeWW6tWF3\nVWVp1/9T6vFaa2Zy9p0nzO2OLmH/LDBLPYqtiD1VnMJ9h7GlqvYk18u6pZPK\nviWfs4bhcTk14rB5rX1ykEQNUPcxYQQ9834SnB5ZWbU6dr1Id6ru/GIV32WX\nGieXUWuaKtr2qyUstdzIwvOsmeXsGg+nWCfF23a6baRVkENPZGDe59S5vgIE\nj/cRFb7JyFZRPKl6vN4Y8F9YA2DJnKVQ2WWC5koCGBV5RADT0kKO+WkpZ9CT\nRnZz\r\n=KGtE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyBrFefq+otZ5+EiW2xlQmS08k9aUFD74g3yw8FnxRnQIhAKYvoecxJFNz0Q7k2QIneQEejtMIpRphiPlywOj/yvXN"}]},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"_npmUser":{"name":"teegee","email":"reginfo@nativecode.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/env_11.0.1_1591678511055_0.07720341270129283"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-03T04:00:01.834Z","1.0.0":"2018-09-03T04:00:02.114Z","modified":"2022-04-06T09:26:35.037Z","1.0.1":"2018-09-03T06:09:43.598Z","1.0.2":"2018-09-04T03:10:24.733Z","1.0.3":"2018-09-04T21:34:49.869Z","1.1.0":"2018-09-04T22:55:22.795Z","1.2.0":"2018-09-10T15:52:09.450Z","1.3.0":"2018-09-13T03:13:21.800Z","1.3.1":"2018-09-22T17:19:38.358Z","1.3.2":"2018-09-23T03:52:55.638Z","1.3.3":"2018-09-23T21:55:11.087Z","1.3.4":"2018-09-24T00:12:24.024Z","1.3.5":"2018-09-24T02:08:39.263Z","1.4.0":"2018-10-09T04:18:35.594Z","1.4.3":"2019-06-22T19:16:47.495Z","1.4.4":"2019-06-22T19:36:00.463Z","1.4.5":"2019-06-22T20:24:47.457Z","1.4.6":"2019-06-22T20:34:03.893Z","1.4.7":"2019-06-22T20:40:00.133Z","2.0.0":"2019-06-22T23:26:29.598Z","2.0.1":"2019-06-23T00:03:16.001Z","2.0.2":"2019-06-23T00:11:52.234Z","2.0.3":"2019-06-24T00:54:05.831Z","2.0.4":"2019-06-24T01:00:07.295Z","2.0.5":"2019-06-24T01:07:14.049Z","2.0.6":"2019-06-27T08:59:08.515Z","2.0.7":"2019-06-27T09:07:32.473Z","2.0.8":"2019-06-27T09:11:49.507Z","3.0.0":"2019-07-06T21:32:27.870Z","3.0.1":"2019-07-06T21:38:43.217Z","3.0.1-canary.1":"2019-07-09T04:31:22.031Z","3.1.0-next.0":"2019-07-09T04:41:41.499Z","3.1.0":"2019-07-09T04:56:10.384Z","4.0.0-next.0":"2019-07-21T16:27:38.825Z","4.0.0":"2019-07-21T16:35:29.645Z","4.0.1-next.0":"2019-07-21T21:52:10.308Z","4.0.1-canary.0":"2019-07-30T18:24:40.840Z","4.0.1-next.1":"2019-07-30T18:38:16.488Z","4.0.1-next.2":"2019-08-03T14:49:14.119Z","4.0.1":"2019-08-03T15:05:28.307Z","4.0.2-next.0":"2019-10-05T03:17:23.745Z","4.0.2":"2019-10-05T03:22:48.453Z","10.0.1":"2019-11-30T23:52:04.441Z","10.1.0-next.0":"2019-12-10T17:06:30.493Z","10.1.0":"2019-12-10T17:11:17.995Z","10.1.0-next.1":"2019-12-10T17:16:05.136Z","10.1.0-next.2":"2019-12-10T19:34:47.023Z","10.1.0-next.3":"2019-12-10T19:57:42.383Z","11.0.0-next.0":"2019-12-11T01:00:57.024Z","11.0.0":"2019-12-11T01:05:34.640Z","11.0.1-next.1":"2020-06-09T04:45:47.789Z","11.0.1":"2020-06-09T04:55:11.209Z"},"maintainers":[{"name":"nativecode-dev","email":"support@nativecode.com"},{"name":"no-frills","email":"support@nativecode.com"},{"name":"teegee","email":"reginfo@nativecode.com"}],"description":"Provides a simple conversion from config object to environment variable.","homepage":"https://github.com/nativecode-dev/nofrills/tree/master/core/env","repository":{"type":"git","url":"git+https://github.com/nativecode-dev/nofrills.git"},"author":{"name":"opensource@nativecode.com"},"bugs":{"url":"https://github.com/nativecode-dev/nofrills/issues"},"license":"MIT","readme":"# @nofrills/env\n\n[![npm](https://img.shields.io/npm/v/@nofrills/env.svg?style=flat-square)](https://www.npmjs.com/package/@nofrills/env)\n\n# Install\n\n```\nyarn add @nofrills/env\n\nnpm install --save @nofrills/env\n```\n\n# Merge with Environment Variables\n\n`env` can merge configuration values with their environment variable declarations. Provided with the following runtime configuration:\n\n```typescript\nexport const ConfigurationInstance = {\n  database: {\n    host: 'localhost',\n    name: 'database',\n    username: ?,\n    password: ?,\n    port: 3306,\n  },\n  version: {\n    major: 1,\n    minor: 0,\n  }\n}\n```\n\nSeems we need to somehow fill the username and password. Since we don't want to store usernames and password when we commit our file, we can merge it with environment variables to determine the credentials to use. Environment variables are a great way to quickly configure an application without messing with files or interfering with other running instances. Let's go ahead and use the `env` object to merge our configuration and environment variables. It does this through the convention of object keys being names of the variables. First, let's see what those keys look like.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst key = Env.key('database.host') // APP_DATABASE_HOST\n```\n\nNote that we always will emit environment variables as upper cased names, prepended with a prefix. However, the case of the environment variables do not matter as we will find them anyway.\n\nNext, let's export our environment variables and use them with our configuration.\n\n```bash\nexport APP_DATABASE_USERNAME=\"test\"\nexport APP_DATABASE_PASSWORD=\"test-password\"\n```\n```typescript\nconst env = Env.merge([ConfigurationInstance])\nconst username = env.value('database.username') // test\nconst password = env.value('database.password') // test-password\n```\n\nAs you can see, it will try to grab the value from the environment if it exists. However, if it does not exist, a default value or an empty string is returned.\n\nWhat if we specified the username and password, but wanted to override the values from the environment instead? We can do that as well, by specifying to use the environment variables first.\n\n```typescript\nconst env = Env.merge([ConfigurationInstance], { override: EnvOverrideType.EnvironmentFirst })\n```\n\nNow, when we wrap the configuration instance, we will use overrides from the environment.\n\n```bash\nexport APP_DATABASE_HOST=my.example.com\n```\n```typescript\nconst host = env.value('database.host') // my.example.com\n```\n\n# Import from Environment Variables\n\nWe can also import and create a configuration object from environment variables, so long as they are created with the convention. Note how we use the `toObject` method to materialize a configuration object.\n\nAlso note how we are able to control the casing of the object by the casing of the environment variable. However, this behavior may change in the future, as it presents a consistency issue when used across machines.\n\n```bash\nexport APP_RUNTIME_DATABASE=\"mssql\"\nexport APP_RUNTIME_HOST=\"localhost\"\nexport APP_version=\"1.0\"\n```\n```typescript\nconst env = Env.from()\nconst config = env.toObject()\nconsole.log(config.RUNTIME.DATABASE) // mssql\nconsole.log(config.RUNTIME.HOST) // localhost\nconsole.log(config.version) // 1.0\n```\n\n# Options\n\n```typescript\nexport interface EnvOptions {\n  env: DictionaryOf<string | undefined>\n  override?: EnvOverrideType\n  prefix: string\n  sync: boolean\n}\n```\n\n## env\n\nSpecifies the object that contains the environment variables, usually from `process.env`. Can also be used when testing to use a known set of environment variables.\n\n## override\n\nAn enum value indicating configuration value preference. The default value is `ConfigFirst`, which means values are read from the configuration object when avialable, falling back to the default value, and finally using the environment variable, if it has one.\n\n`EnvironmentFirst` will always use the environment variable, regardless of whether the configuration object contains a value or not.\n\n```typescript\nexport enum EnvOverrideType {\n  ConfigFirst = 'config-first',\n  EnvironmentFirst = 'environment-first',\n}\n```\n\n## prefix\n\nSpecifies the prefix to use when looking for environment variables. The default is `app`.\n\n## sync\n\nSpecifies whether or not to sync environment variables with the underlying configuration object. The default is `false`.\n\n# Misc\n\nFor further use cases, please see the unit tests.\n\n# FAQ\n\n### Q: Why is sync not the default option?\nSyncing doesn't truly mean anything except that it keeps track of the underling configuration object values as they are read from the environment (when a configuration value does not exist).\n\n### Q: Why is `EnvironmentFirst` not the default option?\nCurrently, using `EnvironmentFirst` will skip checking the configuration object. Why would you want to do this? Because you might have an environment only configuration that you want to materialize as a JS object.\n\n### Q: Why can't I add configuration variables at runtime?\nYour configuration object should be immutable once you've materialized it (however that is done).\n\n# License\nCopyright 2018 NativeCode Development <opensource@nativecode.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\nSoftware, and to permit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED\nTO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md"}