{"_id":"@37bytes/prepare-environment","_rev":"10-28cad5932583b1978f8a0ca08f567f43","time":{"created":"2023-02-15T09:09:17.849Z","1.0.0":"2023-02-14T06:36:06.553Z","modified":"2023-12-21T13:06:50.893Z","1.0.1":"2023-02-14T09:02:23.735Z","1.0.2":"2023-02-14T09:26:39.418Z","1.0.3":"2023-02-14T13:54:04.508Z","1.0.4":"2023-02-15T09:09:18.112Z","2.0.0":"2023-07-21T12:16:39.834Z"},"name":"@37bytes/prepare-environment","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.4":{"name":"@37bytes/prepare-environment","version":"1.0.4","description":"Utility to prepare the environment for a React application. Useful for CI.","repository":{"type":"git","url":"git+https://github.com/37bytes/public-packages.git#master"},"author":{"name":"37bytes"},"license":"MIT","main":"build/index.js","scripts":{"build":"rimraf build && tsc --project ./tsconfig.json","build&watch":"rimraf build && tsc --project ./tsconfig.json --watch","npm-packlist":"npm run build && npx -y npm-packlist@6.0.1","test":"jest"},"bin":{"prepare-environment":"build/index.js"},"engines":{"node":">=16"},"dependencies":{"rc-config-loader":"^4.1.2","rimraf":"^4.1.2"},"devDependencies":{"@jest/globals":"^29.4.1","@types/node":"^18.11.18","jest":"^29.4.1","mock-fs":"^5.2.0","ts-jest":"^29.0.5","typescript":"^4.9.5"},"gitHead":"9c3bf00661c0937322a97b9d65a5c0ae464d6da1","bugs":{"url":"https://github.com/37bytes/public-packages/issues"},"homepage":"https://github.com/37bytes/public-packages/tree/master#readme","_id":"@37bytes/prepare-environment@1.0.4","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-vDN0QNtoD7YpGqeLNvM2tICs6oZJOlYSTrjpziyHKC8R1vCT98kJrW/Mld8m0S6/SO+P3Rq5TWaq8OvO13mt1g==","shasum":"352ac1d7579b8dfe80d4ff967f16e01ef3ce76f1","tarball":"https://registry.npmjs.org/@37bytes/prepare-environment/-/prepare-environment-1.0.4.tgz","fileCount":11,"unpackedSize":15117,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDD69ApEbGYg/ycLYJUbPLyUE1brHiDA9n5eDy8EMfCAiBURVDDoG/0S/yRde05jlYckuymVFApn99tUspAGKW9eQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7KE+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+Vw//WXuNSnBXOCSRq+GTuJRRhST5anOe03xIb++LEYxqKkn6de2G\r\nvnhOpCvZweAXV9oxbp8amtIkCjTXK+sA4yC+GCb/SL++Mgzxmw0IVRimD73t\r\ngSBlNWF3nP9PmqfEHFoHukJJLf57rpphxKeTlsY3xOzOS7qtxdxV+gRNg/F0\r\ntBAwd9/SB/y03XDTpbChMucGQAfMJ06puKSlo0S/iSPKraGwEbW3AKneVXV8\r\nsZ0SppH1LrqfQVlc/hn/6Jo4WqdjpeOJe9PSMIHZbYHjxdqjZc6RrB5DNTd6\r\n92xQFjgEzlvj8IHwWwu4VHmfhSLMF7I+94M0YZUCYZS6m//i8NbQhPrHbIgs\r\nXCviFrmxSsBPDFebU3t+P9sQ1iKaOCBI2jf7UQNR2zGHKTQF20g40u0a/Fzz\r\nJWi/rRpWndT1H2ltheSObQsu3lXkS2VYKxkMmGKCM3IDSCJr2eOKkq8RZpLS\r\nb/IG2t3NemTxOPayf/dmL06ih0tvWlwl4P9SZDQsWVSjD4XohLJ2PHkIaLdy\r\ndLtSmXtxfOhKPKb407U8qP4M82g+uUTv8utbLj72H3RXrpsjbtcEuntZoD+L\r\ni3uC+vToTH68xlAOmP2fRVlNblYXgHR2QQL/cqbMukf2ymvfiIX8IRUv7enH\r\n6dMbOjQJfXZ0afQl5K8keFcNrKxsxlV7Gfc=\r\n=f1dI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yar_vav","email":"yavavilin@37bytes.com"},"directories":{},"maintainers":[{"name":"yar_vav","email":"yavavilin@37bytes.com"},{"name":"rteslenko","email":"rteslenko@37bytes.com"},{"name":"tnikolaeva","email":"tnikolaeva@37bytes.com"},{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},{"name":"mgarmash","email":"ops@37bytes.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prepare-environment_1.0.4_1676452157897_0.43073347171519094"},"_hasShrinkwrap":false},"2.0.0":{"name":"@37bytes/prepare-environment","version":"2.0.0","description":"Utility to prepare the environment for a React application. Useful for CI.","repository":{"type":"git","url":"git+https://github.com/37bytes/public-packages.git#master"},"author":{"name":"37bytes"},"license":"MIT","main":"build/index.js","scripts":{"build":"rimraf build && tsc --project ./tsconfig.json","build&watch":"rimraf build && tsc --project ./tsconfig.json --watch","npm-packlist":"npm run build && npx -y npm-packlist@6.0.1","test":"jest"},"bin":{"prepare-environment":"build/index.js"},"engines":{"node":">=16"},"dependencies":{"rc-config-loader":"^4.1.2","rimraf":"^4.1.2"},"devDependencies":{"@jest/globals":"^29.4.1","@types/node":"^18.11.18","jest":"^29.4.1","mock-fs":"^5.2.0","ts-jest":"^29.0.5","typescript":"^4.9.5"},"gitHead":"8b85421b899c02af32c53cfc227596113a643603","bugs":{"url":"https://github.com/37bytes/public-packages/issues"},"homepage":"https://github.com/37bytes/public-packages/tree/master#readme","_id":"@37bytes/prepare-environment@2.0.0","_nodeVersion":"19.5.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-cZZ1dna/VAoW5EUjsrcrl4+ak2F/BRSqJPGSAmMaeqVKvLn0me0qBL9X/+TBMCEZ5y35XfSCtj/MPQPxVb6Ppg==","shasum":"40c92ab27e0be5b391c16967ded4248bef36b940","tarball":"https://registry.npmjs.org/@37bytes/prepare-environment/-/prepare-environment-2.0.0.tgz","fileCount":12,"unpackedSize":16484,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAvtJHcHXkpTj+glHy7BDAxVeP83OVx7W2QlKTrsX5s9AiEAzF9nVpLauZ6Y9JwKoqHI3S2TEN4mjRxF1FdZ2uRQ/Nw="}]},"_npmUser":{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},"directories":{},"maintainers":[{"name":"rispaev","email":"rispaev@37bytes.com"},{"name":"yar_vav","email":"yavavilin@37bytes.com"},{"name":"rteslenko","email":"rteslenko@37bytes.com"},{"name":"tnikolaeva","email":"tnikolaeva@37bytes.com"},{"name":"dc.nikolaev","email":"dnikolaev@37bytes.com"},{"name":"mgarmash","email":"ops@37bytes.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prepare-environment_2.0.0_1689941799690_0.001021670511375472"},"_hasShrinkwrap":false}},"maintainers":[{"email":"naushev@37bytes.com","name":"arhonist-37b"},{"email":"rispaev@37bytes.com","name":"rispaev"},{"email":"yavavilin@37bytes.com","name":"yar_vav"},{"email":"rteslenko@37bytes.com","name":"rteslenko"},{"email":"tnikolaeva@37bytes.com","name":"tnikolaeva"},{"email":"dnikolaev@37bytes.com","name":"dc.nikolaev"},{"email":"ops@37bytes.com","name":"mgarmash"}],"description":"Utility to prepare the environment for a React application. Useful for CI.","homepage":"https://github.com/37bytes/public-packages/tree/master#readme","repository":{"type":"git","url":"git+https://github.com/37bytes/public-packages.git#master"},"author":{"name":"37bytes"},"bugs":{"url":"https://github.com/37bytes/public-packages/issues"},"license":"MIT","readme":"\n\n### Usage\n\n1. `prepare-environment ENV_NAME=stage`\n   In this case app looking for `.environmentrc` automatically. The file must be located in the root.\n\n2. `prepare-environment ENV_NAME=stage CONFIG_PATH=configs/.environmentrc`  \n   In this case app get `.environmentrc` file from the custom path.\n\n### Optional parameters default values\n- CONFIG_PATH = `/`,\n\n### Local developing\n1. `create ./environments/.env.stage (env file must match ENV_NAME=stage)`\n2. `ts-node src/index.ts <...>`\n3. `npm run build&watch`; `node build/index.js <...>`\n4. `npm run build`; `chmod +x build/index.js`; `npm link`; `prepare-environment <...>`\n5. `example: ts-node src/index.ts CONFIG_PATH=__fixtures__/.environmentrc ENV_NAME=stage`\n\n### version history\n\n2.0.0\n- Elimination of allowedEnvironments. Instead, available environments are computed from the environments folder.\n- Added 'isEnvironmentExists' function in utils. The function takes parameters: targetEnvironment - the name of the environment, and pathToEnvironmentsFolder - the path to the folder containing the environments. The function checks for the presence of the .env.targetEnvironment file in the environments folder.\n- fix for environment name check\n\n1.0.4\n- refactoring the script version\n\n1.0.3\n- refactoring utils and main script\n\n1.0.2\n- update .npmignore\n\n1.0.1 \n- fix small bugs\n\n1.0.0\n- first version\n","readmeFilename":"README.md"}