{"_id":"veggie","_rev":"28-7c9e31cd438df2bed60eee98e275d898","name":"veggie","description":"Interactive mock server for profiling user scenarios","dist-tags":{"latest":"2.4.1","beta.1":"3.0.0-beta.1","beta.2":"3.0.0-beta.2","beta":"3.0.0-beta.13"},"versions":{"1.2.0":{"name":"veggie","version":"1.2.0","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.17.2","chalk":"^2.1.0","es6-promise":"^4.1.1","express":"^4.15.3","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","mocha":"^3.5.0","nodemon":"^1.12.1","nyc":"^11.1.0","parallelshell":"^3.0.2","rollup":"^0.45.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"d72503f06700875df545fe6d787088cb8a5e1a1e","_id":"veggie@1.2.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-ZWu1LEgNiir41DzK04uM4NiUZnXfQOHl4w6Tpt+nySipSd7CXfZNxU1+B5LkX4qiyvV59Y116NHVr+Mx1S0yfA==","shasum":"129d74f55e8ec88422d15b4f7c9c8104e94c66e0","tarball":"https://registry.npmjs.org/veggie/-/veggie-1.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDj6YOeQh40UKu80ZkJEWcADgOlastT3YgucItSqcrzbAiEAjro6C8oeSeSGYBy80iMbm2j0nNJU6OJ6DP2HjT2mzrI="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-1.2.0.tgz_1508967943515_0.7480438358616084"},"directories":{}},"1.2.1":{"name":"veggie","version":"1.2.1","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.17.2","chalk":"^2.1.0","es6-promise":"^4.1.1","express":"^4.15.3","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.0","nodemon":"^1.12.1","nyc":"^11.1.0","parallelshell":"^3.0.2","rollup":"^0.45.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"73bdaf4498f21328342817cbb631983b4f9b8cbe","_id":"veggie@1.2.1","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-kU+Ob238mhbUJ+iqfVWTeZt0NRzySm0L5LPg6Rqdleh1LnutBA/pTYpBvaTUrW9Tb2fZ6UFLsVvhP7/zSdsLNQ==","shasum":"1dcdac2c3a0baf1b52e82290455d23ba2fa83422","tarball":"https://registry.npmjs.org/veggie/-/veggie-1.2.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDywGwxVbVeoeD5CptZNNBRFYBQuf/NzViuciBKs+nG1wIhAK4bB8W61gmK5QQitcbDcxrkOY+a240p7CnZ5hCF1OCJ"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-1.2.1.tgz_1508968844532_0.22474746918305755"},"directories":{}},"2.0.0":{"name":"veggie","version":"2.0.0","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.17.2","chalk":"^2.1.0","es6-promise":"^4.1.1","express":"^4.15.3","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.0","nodemon":"^1.12.1","nyc":"^11.1.0","parallelshell":"^3.0.2","rollup":"^0.45.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"42d26b6c2110944d2ff46c9e45291a62c599c25d","_id":"veggie@2.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-kjlroD/ySw/nElP9/uSoWtU2iyMS0z5v5eiQFZegRDeNN4PEt9up7IruzB/2fzMrT1iuawD+Xeg9oUI76wD6IQ==","shasum":"d68f59b6dc8f1c1805f2f6c77cfc58b9eb525934","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPslD2s2eIAZ4T3+JC2G+Zh1UFLQlIJVS6tUNsR6pIOAiBS2lgbUG3amJyKQGZpnY9l6vgsXUICGID5kqV3Yro7BA=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.0.0.tgz_1508976913378_0.9418072109110653"},"directories":{}},"2.0.1":{"name":"veggie","version":"2.0.1","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.17.2","chalk":"^2.1.0","es6-promise":"^4.1.1","express":"^4.15.3","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.0","nodemon":"^1.12.1","nyc":"^11.1.0","parallelshell":"^3.0.2","rollup":"^0.45.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"cb4aac441726091dc458e76d404b149c9a25a31a","_id":"veggie@2.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-WG9q8n1Ahvyh05SkBakerO7bxMbALwHhosQDP1lhP0h0XmeV0a6DLRSOXH8Ki0hX06cN9UcilkFAdMruTtM3wQ==","shasum":"4197fa396f53b38ba013ac9a82e5dda636d0d4c0","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+zYTCb6axlIPGamVosO1MMzCoykdtOHV/csE+mLeb6gIgCQfxci+r0YABP7BjdDwgjCW10ODqcmNFEiRviY0tiY8="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.0.1.tgz_1509039222089_0.36220886185765266"},"directories":{}},"2.1.0":{"name":"veggie","version":"2.1.0","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"270e629f162807836ffe3d597854741345bb52a4","_id":"veggie@2.1.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-XGaPxWfFG3x8QLfJmzFTDxW+rzjGEXQH0j0mTGd4ApG8/nl5uCZFbNf+lg2l1Rx8HczuZig0qQ2kbA/1naA4aA==","shasum":"407292e9e34ff036e796deb4bd7465a6eefbf2f5","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYK7ITL1MY0xO5Om23ANMLCoSG4SK7lNCXRosvlDXkPAiB8CZjgbyCGd9scAmL1MaMYEhL4597i607YHKVtwpR6Wg=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.1.0.tgz_1509050848859_0.35212128213606775"},"directories":{}},"2.2.0":{"name":"veggie","version":"2.2.0","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","serve":"bin/veg --dir test/services/*.js","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"bcac75c03372ea9c7bb18785585fd22f5e6d4654","_id":"veggie@2.2.0","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-ExgxNjRFYpJEfdIofieP+2ZN1bzf+wgGi1B8W0YDSheiey9lZFw8oxmb5hu89SnqtecqhDM9OpQNhZaQaYbvPA==","shasum":"7e613c587a1b7c16519bba017581006f95ff2bb5","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwUc0ptHKev6+HsaxZI49iNo071218mWD0l7yo7Plm1QIhAN2yCsAybLaltWlNHJGGNxWGAmmJpS08vTZs6IawHgA2"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.2.0.tgz_1509389782611_0.7093049078248441"},"directories":{}},"2.3.0":{"name":"veggie","version":"2.3.0","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","serve":"bin/veg --dir test/services/*.js","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"aad5316c50aa645266f96397f72f1e6ea8663291","_id":"veggie@2.3.0","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-0+ngGhb5MzW6ddZQgnev+4AY68ltCqezfFf8dyYMZl3c4qCRKkKUFTxO1ls4xqFDNNWisXAqB86HmUhMx5SWog==","shasum":"75f591a1f66587fb33750d643f784bb38c046e32","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyXhj5EzIDuQ0URgt/Cc467vmwumiN2xBtWUuBiwVYvwIhAJQLF24oJnM90tW2kfpJOaFcfHZ48vtONH/W9ZTfCHfC"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.3.0.tgz_1509561110443_0.6595875083003193"},"directories":{}},"2.3.1":{"name":"veggie","version":"2.3.1","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/www"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","serve":"bin/veg --dir test/services/*.js","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"a21559c6f1e91760b24f61292f2648077819fd37","_id":"veggie@2.3.1","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-i54vS2B1OuTTn1HQdsP1mMc0DkjH3NsqdwqH7omcy1sx4p9M1SUZdzeOzDNtLQavai9CYS5oqAfTA/7Cyi7Ipg==","shasum":"f27ac73faa4e422c93f78c415b26ff343f028aec","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.3.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBY9C6knlHb8VGioIt0NEZ9G760TXZDTaNrJ7nuQStLHAiEAhm06MCl12V0NAHwGurQk2E8fcXLtBAbwv9Zhd04axX0="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.3.1.tgz_1509743439879_0.41225499170832336"},"directories":{}},"2.3.2":{"name":"veggie","version":"2.3.2","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","serve":"bin/veg --dir test/services/*.js","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"4a0ab569fc40b9ec0447f59c447b5c22782c255c","_id":"veggie@2.3.2","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-M3kpHGKFmKqRLRhv4AqCMxX8Rc3xmMy8Ck6eIirBTLu5e1ezPLmi27S5j8nAwb9j92Y2buX/8kO1zCf5onW4cQ==","shasum":"41ef54d1f05e53c23b2acacc6cb01622f5f18927","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.3.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4sHxy7Iyl7ZT1wcmC6BIT+qovw+fsHqwdKAA74bOfcgIgTcdesgjIiVMcrBr+FSivqY0FwZvPeT0ZitWmGzw1594="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.3.2.tgz_1510006764207_0.6804687147960067"},"directories":{}},"2.4.0":{"name":"veggie","version":"2.4.0","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","serve":"bin/veg --dir test/services/*.js","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"4e852ed4f8077ea93c8acad41837a6ceb3c0eaaf","_id":"veggie@2.4.0","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-XdLkuQGXcjmSgCzrVJPB7GqHsLaigroaYsmB1rDztnDMe74Vqxy+/BTS9j6KZ9iAPDMmVE4w2Kd2Vgv+83fV4Q==","shasum":"33c79ecaeb5e9aae4b0f6188efd0684c6fdb4e37","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.4.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhmwT6PHVYKL0g9OPTlb/w2RKJCSy0FgoJAznrpqH6cAiEAhJEeVNPXIKhYEN2GtM4UR4LNx8iCIuIo9Hmr/x/NgU4="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.4.0.tgz_1510676468070_0.5498526194132864"},"directories":{}},"2.4.1":{"name":"veggie","version":"2.4.1","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c","build:watch":"nodemon -w src -x 'npm run build'","coverage":"nyc report --reporter=text-lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","pretest":"npm run build","serve":"bin/veg --dir test/services/*.js","test":"nyc --reporter=html --reporter=text mocha","test:watch":"nodemon -w dist -w test -x 'nyc mocha'","watch":"parallelshell 'npm run test:watch' 'npm run build:watch'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.1.1","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","rollup":"^0.50.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-es2015-rollup":"^3.0.0","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.12.1","nyc":"^11.3.0","parallelshell":"^3.0.2","rollup-plugin-babel":"^3.0.2","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0"},"files":["bin","dist"],"gitHead":"6c66bd7a90036b2a927df1014ec4e79b8d9dfb68","_id":"veggie@2.4.1","_npmVersion":"5.5.1","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-qzptmVKtlWP+IzC5PbLDad1pMcxqiTCoqbhryrnaFNftXDvwJbcRPpY7IDFfKPabE+v/fo3pBA5Ks9Fd5I3E3A==","shasum":"df2ab8fd2138dcc56c6950704abbdad04700c844","tarball":"https://registry.npmjs.org/veggie/-/veggie-2.4.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZ2wP748gbd38n+0qHuvMJjorJOrh79yQPOwA0ViN+eAiBiIQJFxCDAEO61pwckdDz7Qt8YKQ+q2eRS5ax8qXS/jA=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-2.4.1.tgz_1510676619765_0.26249164529144764"},"directories":{}},"3.0.0-beta.1":{"name":"veggie","version":"3.0.0-beta.1","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.2.2","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.3","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"6bd83d2e3d27925092985392e276851d393b21a7","_id":"veggie@3.0.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-liNVJgwEvSEcIp4Zf2+b8451BPRozE8UM+bH3XUu1WZsfMM0TQhJEmNsHi+4YsXO1+VRBEMl0YdqDNK4MINw1A==","shasum":"94232e6e80efe62e20808c4ee1ca2fe92c5b4bd1","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHAPjrn3KxM3JxAxov8duGU0Vrnt2xyf7fCIIv4bXG9BAiEA2tIRgjgbc9nROJxC4J2rG6ZIvripkBnG6tFTw1y0t6Y="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.1.tgz_1516672454106_0.5154148919973522"},"directories":{}},"3.0.0-beta.2":{"name":"veggie","version":"3.0.0-beta.2","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.2.2","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.3","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"d0e82b66d82cc0acefd631e8d80ac1a94dc78738","_id":"veggie@3.0.0-beta.2","_npmVersion":"5.6.0","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-ZMxqE7oqNyQK4ansLnU6QBMOnKhDReE1M9nr5pztagyIloY3pIEUALQPiK0Na08mFn/JLTv23ZoppTatSGlO2g==","shasum":"910557e9fa9248d9c85ec017bdb2277f3189ed74","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDF+WO0MpEeRL1WsFQAZUHZA7QNudofD56+qNLu5PiZcgIhAJrv530XjoDGfn7ZY3iyCIvU32g6RSgWoMMWmNIVxJZH"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.2.tgz_1516675613343_0.6514938063919544"},"directories":{}},"3.0.0-beta.3":{"name":"veggie","version":"3.0.0-beta.3","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.2.2","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.3","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"16071ae03206fbee424bc843485b9b7dd5efdb16","_id":"veggie@3.0.0-beta.3","_npmVersion":"5.6.0","_nodeVersion":"8.8.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-/u1vvCPFwHyCbCtVszD+xdWJ+B61AmpJtGRWBfrr7wuhPj63MEM+dTm/vhDnGla0Lln/Qwhr/OJwoxwKinzIfg==","shasum":"4484c147a6769e37a37381db5a09a35cb16c901f","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDFCpOfpMkgbFfXFN5zICKCqcQRAi7IVvqpq64npMjTLAiBrgPNvGMOe19pXbH+7ziksP/eJesd9mTO9r+q8aToHOQ=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.3.tgz_1517156628094_0.7073986099567264"},"directories":{}},"3.0.0-beta.4":{"name":"veggie","version":"3.0.0-beta.4","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-polyfill":"^6.26.0","babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","es6-promise":"^4.2.2","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","isomorphic-fetch":"^2.2.1","meow":"^3.7.0","path-to-regexp":"^2.1.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-external-helpers":"^6.22.0","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.3","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"ea32f578c4a9cb9c1091a1d24dc1c6afbce8960b","_id":"veggie@3.0.0-beta.4","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-rRAnH1d3iSnTBGGgqI3CtCNRNCjBr//kAvKpY64QhPEx7BPOKwWK+068v8UOMdA77lW4ZFe4xtXR/49ICdHFVA==","shasum":"45d946b0c82ae0efbef18f352ad89ecdb9de1e21","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICG7z6zoZK1ZaYUPtKgS7e4FY9t12zy9f0CEAKb9qNV4AiBSl/QDFAmjDV/9eLg32SiKHEAePCFk3kQ/PQSOP3OXnA=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.4.tgz_1517173358671_0.6198396442923695"},"directories":{}},"3.0.0-beta.5":{"name":"veggie","version":"3.0.0-beta.5","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.51.8","rollup-plugin-babel":"^3.0.3","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"9ea625f04ba04f4fe26d031680bdd2b232e1723f","_id":"veggie@3.0.0-beta.5","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-yT4OD76ur+2FSHj16OChqGO8dpo/MsdSvZstoY/CzBPyu1dWgtvi6bNgR8pIX1Bu6obWRmyzsBl+EQkj9U+F8Q==","shasum":"328881cb373232fc128e440c726fcbeefae95d4e","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJTjtG8RHBfqXd/aXntCdEY0hQYg7G0xZhXADHN1GdxAiAITNRiYhW/h3NOWykmTgc2djJnvuBhLzxgbgleupfjXQ=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.5.tgz_1517174564093_0.022781906882300973"},"directories":{}},"3.0.0-beta.6":{"name":"veggie","version":"3.0.0-beta.6","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"f911f8848f3b80aa5b6bfdd74d1178cabd1400f6","_id":"veggie@3.0.0-beta.6","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-7ANjqFHUu7dQ/kIXVdyuNfttCV9jjj1ZOOrVs2Dtx99COYNlguuBXkI9/yY1eJn5CEScopxwyvqSz0KZXE4xPw==","shasum":"43d3d236d9dac1bc4e7e0eb6bfef1ae0ddaa76d7","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExuvYk7LS2jwMKDleVO0XJd+knqijog6IREqnEpIaTjAiAI+xk23UuaUuRDVWdavGIYQuklxyU4xTymmQA+m/c3NA=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.6.tgz_1517372620765_0.9858022923581302"},"directories":{}},"3.0.0-beta.7":{"name":"veggie","version":"3.0.0-beta.7","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"gitHead":"3297297092b2c1d4b2a0fed726a6baa8f0d93abd","_id":"veggie@3.0.0-beta.7","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-S3cQ5BhFJndvqF96aLTeLCSxFgGH2WOCj4s480vf152hMt9YxyX9HosXqFAh9NwTjfdVe3rOIqqRJcIhooHatg==","shasum":"5dbed85a1192c7aee82b77f389b8a3bd53c23fd3","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP8Nr95zDlMV49qYkN+/TZTIxS+GgdE/sWnm4jlZtQxgIhAKBY/SMVGsR0R63gBQBtcUcr1Kpj6ggR0NrLyqXx825X"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie-3.0.0-beta.7.tgz_1517840104129_0.6521613928489387"},"directories":{}},"3.0.0-beta.8":{"name":"veggie","version":"3.0.0-beta.8","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"readme":"\n# veggie\n\n[![Build Status](https://travis-ci.org/micburks/veggie.svg?branch=master)](https://travis-ci.org/micburks/veggie)\n[![Coverage Status](https://coveralls.io/repos/github/micburks/veggie/badge.svg?branch=master)](https://coveralls.io/github/micburks/veggie?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/veggie.svg)](https://www.npmjs.com/package/veggie)\n[![License](https://img.shields.io/npm/l/rollup.svg)](https://github.com/micburks/veggie/blob/master/LICENSE)\n\n> *Eat your damn vegetables*\n\nInteractive mock server for profiling user scenarios\n\nWith veggie you can add mock data and route handlers to an existing server.\nVeggie provides a API to alter requests while the server is running to allow\nyou to manage user scenarios.\n\n\n### Motivation\n\nVeggie was created to do 3 things:\n\n- serve mock data in a dev server\n- serve the same data in tests\n- allow testing/demoing specific user scenarios\n\nA user scenario (or profile) is defined here as a set of services and their\nresponses. This may include varying errors from different services due to bad\ninput data or downed servers, or it could refer to situations where a user is\nnot enrolled in a campaign or not registered for an application. Any situation\nworth testing.\n\n\n### Installation\n\n```bash\nnpm i -D veggie\n```\n\n\n## Service configuration\n\n### Create routes\n\nVeggie builds an express router by looking at service files. A service file is\na file that exports an object that keys your service url to either:\n\n- a static JSON object\n- a path to a json file\n- an express route that completes the request\n\n\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n\n  // JSON object\n  '/service/user': {\n    d: {\n      id: 1\n    }\n  },\n\n  // Hot-loaded JSON file\n  '/service/posts': path.join(__dirname, '../data/posts.json'),\n\n  // Express route\n  '/service/post/save': function (req, res) {\n    res.send({ message: 'Post saved!' })\n  }\n}\n```\n\n\n#### Hot-loaded JSON files: \n\nIf you are using a path to a JSON file, the file will be loaded every time this\nurl is reached. This allows you to edit your JSON file and have it sent without\nrestarting your development server.\n\n\n## Configuration options\n\n| Option | Type |  Description | Required | Default | Example |\n| ------ | ---- | -------- | ----------- | ------- | ------- |\n| dir | string | Glob matching the service configuration files | yes | | `'services/**/*.js'` |\n| time | number | Max delay in milliseconds before returning mock data | no | `1000` | |\n| log | boolean | Enable logging | no | `true` | |\n| profileDir | string | Directory with which to save/load profiles | no | `process.cwd() // [1]` | |\n| profile | string | Initial profile to load | no | | `userNotRegistered` |\n\n[1] `process.cwd()` is the directory where the server was started\n\n\n## Serve your veggie routes\n\n### Serve mock data from webpack-dev-server\n\n```javascript\n// webpack.config.js\nconst veggie = require('veggie')\n// ...\n  devServer: {\n    setup(app) {\n      app.use(veggie.router(options))\n    }\n  }\n// ...\n```\n\n\n### Serve mock data from a stand alone server\n\n#### Run the server\n\n```bash\nveg -d services/**/*.js -p 1337 -t 1000\n```\n\nto serve from port 1337 with a max delay of 1 second\n\n\n#### Add proxies to webpack-dev-server\n\nIn this case, you could then proxy from your dev server to the mock data\nserver. For example, in webpack-dev-server:\n\n```javascript\n// webpack.config.js\n// ...\n  devServer: {\n    proxy: {\n      '/services': 'http://localhost:1337'\n    }\n  }\n// ...\n```\n\n\n### Serve mock data in tests from karma\n\nThe mock middleware can be used in karma via the following\n\n```javascript\n// karma.conf.js\nconst mockMiddleware = require('veggie').middleware\n// ...\n  middleware: ['veggie'],\n  plugins: [\n    'karma-*',\n    {\n      'middleware:veggie': [ 'factory', function () {\n        return mockMiddleware(options)\n    }]\n    }\n  ]\n// ...\n```\n\n*Note about implementation: For the sake of uniformity, this middleware will\nactually spawn an express server, as the binary would, and proxies all requests\nto that. This is so we can use Express routes and all the useful methods that\ncome along with them.*\n\n\n## Managing profiles\n\nVeggie provides a helpful set of methods to alter the data served from the\nrunning server. This API is the core of creating and changing profiles. These\nmethods create overrides to the services we defined in the service\nconfiguration. The override configuration (i.e. the profile) can be saved and\nsubsequently loaded back into the server.\n\n\n### API methods\n\n*Note: All methods use fetch and return a promise. A promise polyfill may be\nrequired depending on your environment.*\n\n\n#### block\n```javascript\n// Set the '/getUser' response to be an empty object with a 404 status code\nveggie.block('/getUser')\n```\n\n#### blockAll\n```javascript\n// TODO: Not implemented - possibly not even wanted\n// Block all services as above\nveggie.blockAll()\n```\n\n#### set\n```javascript\n// Set the '/getUser' status code and response \nveggie.set('/getUser', 400, { message: 'Bad request for /getUser' })\n```\n\n#### hang\n```javascript\n// Set the '/getUser' route handler to never respond\n veggie.hang('/getUser')\n```\n\n#### reset\n```javascript\n// Reset the '/getUser' response to the default specified in the service configuration\nveggie.reset('/getUser')\n```\n\n#### resetAll\n```javascript\n// Reset all current overrides or remove current profile\nveggie.resetAll()\n```\n\n#### show\n```javascript\n// Show the currently overriden services\nveggie.show()\n```\n\n#### showAll\n```javascript\n// Show the current override configuration\nveggie.showAll()\n```\n\n#### save\n```javascript\n// Save the current override configuration as a profile using the given name\n// Saved to '<profileDir>/adminUser.json'\nveggie.save('adminUser')\n```\n\n#### load\n```javascript\n// Load the profile matching the given name\n// Loaded from '<profileDir>/adminUser.json'\nveggie.load('adminUser')\n```\n\n*Note: profileDir (for save and load) defaults to `process.cwd()` (the directory the server was\nlaunched from). It can alternatively be set using the `profileDir` options*\n\n\n### Call API from browser\n\nBy placing a script tag in your demo index.html, you can call the API methods\nfrom the browser console.\n\n```html\n<script src=\"/node_modules/veggie/dist/veggie.api.js\"></script>\n```\n\nThe veggie API will be available namespaced to `window.veggie`\n\n*Note: promise and fetch polyfills may be required depending on your browser*\n\n\n### Call API from tests\n\n#### Testing in the browser\n\n```javascript\n// This should point to veggie's package.json `browser` field (`veggie.api.js`)\nimport * as veggie from 'veggie'\n\n// If you plan to test in a fetch-less browser\nrequire('isomorphic-fetch')\n// or just\nrequire('whatwg-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n\n\n#### Testing in Node\n\n```javascript\n// This should point to veggie's package.json `main` or `module` field (`veggie.js` or `veggie.es.js`)\nconst veggieApi = require('veggie').api\n// or\n// import { api as veggieApi } from 'veggie'\n\n// In node, you need to specify the port and host before using the api\n// port defaults to 1337\n// host defaults to 'http://localhost'\n// veggieApi returns the api pointed to the specified host and port \nconst veggie = veggieApi(9999, 'http://localhost')\n\n// Fetch is required\nrequire('isomorphic-fetch')\n// or just\nrequire('node-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n","readmeFilename":"README.md","gitHead":"a275707088601deef359d7e4d40c52f52897e5e2","_id":"veggie@3.0.0-beta.8","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-+llZCvwNXZawVVfxADQoX5oF6ewlk3u0uzmRQaE4jJXBaJpk0yVdCeUsC90s5AH4hIn5DOZI2gbvxZolnR5UmQ==","shasum":"aacc260c31f3003aa6ee0a1bebe2dbd23d678c88","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.8.tgz","fileCount":7,"unpackedSize":2913680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFzgTFHZklan0+OXTvacN2RPt8/5ooZ1/BrDE3XqK4K0AiEAk8LhG863sszqLtzylN7GxBrA8rg2jZ5mZRal0uSGs6s="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie_3.0.0-beta.8_1519578849520_0.5051434413082583"},"_hasShrinkwrap":false},"3.0.0-beta.9":{"name":"veggie","version":"3.0.0-beta.9","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"readme":"\n# veggie\n\n[![Build Status](https://travis-ci.org/micburks/veggie.svg?branch=master)](https://travis-ci.org/micburks/veggie)\n[![Coverage Status](https://coveralls.io/repos/github/micburks/veggie/badge.svg?branch=master)](https://coveralls.io/github/micburks/veggie?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/veggie.svg)](https://www.npmjs.com/package/veggie)\n[![License](https://img.shields.io/npm/l/rollup.svg)](https://github.com/micburks/veggie/blob/master/LICENSE)\n\n> *Eat your damn vegetables*\n\nInteractive mock server for profiling user scenarios\n\nWith veggie you can add mock data and route handlers to an existing server.\nVeggie provides a API to alter requests while the server is running to allow\nyou to manage user scenarios.\n\n\n### Motivation\n\nVeggie was created to do 3 things:\n\n- serve mock data in a dev server\n- serve the same data in tests\n- allow testing/demoing specific user scenarios\n\nA user scenario (or profile) is defined here as a set of services and their\nresponses. This may include varying errors from different services due to bad\ninput data or downed servers, or it could refer to situations where a user is\nnot enrolled in a campaign or not registered for an application. Any situation\nworth testing.\n\n\n### Installation\n\n```bash\nnpm i -D veggie\n```\n\n\n## Service configuration\n\n### Create routes\n\nVeggie builds an express router by looking at service files. A service file is\na file that exports an object that keys your service url to either:\n\n- a static JSON object\n- a path to a json file\n- an express route that completes the request\n\n\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n\n  // JSON object\n  '/service/user': {\n    d: {\n      id: 1\n    }\n  },\n\n  // Hot-loaded JSON file\n  '/service/posts': path.join(__dirname, '../data/posts.json'),\n\n  // Express route\n  '/service/post/save': function (req, res) {\n    res.send({ message: 'Post saved!' })\n  }\n}\n```\n\n\n#### Hot-loaded JSON files: \n\nIf you are using a path to a JSON file, the file will be loaded every time this\nurl is reached. This allows you to edit your JSON file and have it sent without\nrestarting your development server.\n\n\n## Configuration options\n\n| Option | Type |  Description | Required | Default | Example |\n| ------ | ---- | -------- | ----------- | ------- | ------- |\n| dir | string | Glob matching the service configuration files | yes | | `'services/**/*.js'` |\n| time | number | Max delay in milliseconds before returning mock data | no | `1000` | |\n| log | boolean | Enable logging | no | `true` | |\n| profileDir | string | Directory with which to save/load profiles | no | `process.cwd() // [1]` | |\n| profile | string | Initial profile to load | no | | `userNotRegistered` |\n\n[1] `process.cwd()` is the directory where the server was started\n\n\n## Serve your veggie routes\n\n### Serve mock data from webpack-dev-server\n\n```javascript\n// webpack.config.js\nconst veggie = require('veggie')\n// ...\n  devServer: {\n    setup(app) {\n      app.use(veggie.router(options))\n    }\n  }\n// ...\n```\n\n\n### Serve mock data from a stand alone server\n\n#### Run the server\n\n```bash\nveg -d services/**/*.js -p 1337 -t 1000\n```\n\nto serve from port 1337 with a max delay of 1 second\n\n\n#### Add proxies to webpack-dev-server\n\nIn this case, you could then proxy from your dev server to the mock data\nserver. For example, in webpack-dev-server:\n\n```javascript\n// webpack.config.js\n// ...\n  devServer: {\n    proxy: {\n      '/services': 'http://localhost:1337'\n    }\n  }\n// ...\n```\n\n\n### Serve mock data in tests from karma\n\nThe mock middleware can be used in karma via the following\n\n```javascript\n// karma.conf.js\nconst mockMiddleware = require('veggie').middleware\n// ...\n  middleware: ['veggie'],\n  plugins: [\n    'karma-*',\n    {\n      'middleware:veggie': [ 'factory', function () {\n        return mockMiddleware(options)\n    }]\n    }\n  ]\n// ...\n```\n\n*Note about implementation: For the sake of uniformity, this middleware will\nactually spawn an express server, as the binary would, and proxies all requests\nto that. This is so we can use Express routes and all the useful methods that\ncome along with them.*\n\n\n## Managing profiles\n\nVeggie provides a helpful set of methods to alter the data served from the\nrunning server. This API is the core of creating and changing profiles. These\nmethods create overrides to the services we defined in the service\nconfiguration. The override configuration (i.e. the profile) can be saved and\nsubsequently loaded back into the server.\n\n\n### API methods\n\n*Note: All methods use fetch and return a promise. A promise polyfill may be\nrequired depending on your environment.*\n\n\n#### block\n```javascript\n// Set the '/getUser' response to be an empty object with a 404 status code\nveggie.block('/getUser')\n```\n\n#### blockAll\n```javascript\n// TODO: Not implemented - possibly not even wanted\n// Block all services as above\nveggie.blockAll()\n```\n\n#### set\n```javascript\n// Set the '/getUser' status code and response \nveggie.set('/getUser', 400, { message: 'Bad request for /getUser' })\n```\n\n#### hang\n```javascript\n// Set the '/getUser' route handler to never respond\n veggie.hang('/getUser')\n```\n\n#### reset\n```javascript\n// Reset the '/getUser' response to the default specified in the service configuration\nveggie.reset('/getUser')\n```\n\n#### resetAll\n```javascript\n// Reset all current overrides or remove current profile\nveggie.resetAll()\n```\n\n#### show\n```javascript\n// Show the currently overriden services\nveggie.show()\n```\n\n#### showAll\n```javascript\n// Show the current override configuration\nveggie.showAll()\n```\n\n#### save\n```javascript\n// Save the current override configuration as a profile using the given name\n// Saved to '<profileDir>/adminUser.json'\nveggie.save('adminUser')\n```\n\n#### load\n```javascript\n// Load the profile matching the given name\n// Loaded from '<profileDir>/adminUser.json'\nveggie.load('adminUser')\n```\n\n*Note: profileDir (for save and load) defaults to `process.cwd()` (the directory the server was\nlaunched from). It can alternatively be set using the `profileDir` options*\n\n\n### Call API from browser\n\nBy placing a script tag in your demo index.html, you can call the API methods\nfrom the browser console.\n\n```html\n<script src=\"/node_modules/veggie/dist/veggie.api.js\"></script>\n```\n\nThe veggie API will be available namespaced to `window.veggie`\n\n*Note: promise and fetch polyfills may be required depending on your browser*\n\n\n### Call API from tests\n\n#### Testing in the browser\n\n```javascript\n// This should point to veggie's package.json `browser` field (`veggie.api.js`)\nimport * as veggie from 'veggie'\n\n// If you plan to test in a fetch-less browser\nrequire('isomorphic-fetch')\n// or just\nrequire('whatwg-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n\n\n#### Testing in Node\n\n```javascript\n// This should point to veggie's package.json `main` or `module` field (`veggie.js` or `veggie.es.js`)\nconst veggieApi = require('veggie').api\n// or\n// import { api as veggieApi } from 'veggie'\n\n// In node, you need to specify the port and host before using the api\n// port defaults to 1337\n// host defaults to 'http://localhost'\n// veggieApi returns the api pointed to the specified host and port \nconst veggie = veggieApi(9999, 'http://localhost')\n\n// Fetch is required\nrequire('isomorphic-fetch')\n// or just\nrequire('node-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n","readmeFilename":"README.md","gitHead":"6d46d4ca4f679a63bc3a2d4566cb0ce5fced1e90","_id":"veggie@3.0.0-beta.9","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-+nkyGfptnSSfNruwsValVuAnJYYigGpS9hfg15g+2BA4u867h4Jr+Po/zmow1zJta21d589JdEJWhs948zm4Vw==","shasum":"a1deb08a9e6e27500dbcf14f857b26dc659d6b31","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.9.tgz","fileCount":7,"unpackedSize":2913668,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMhwZKaHb3/YhmLxqssMixbX1ICL+jo+splEjInNzhqAiEA0phbLfLKDDARqBWhazgkk6d7wbYRxdqYfEuUKnBJUJg="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie_3.0.0-beta.9_1519579835749_0.6276362008327991"},"_hasShrinkwrap":false},"3.0.0-beta.10":{"name":"veggie","version":"3.0.0-beta.10","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"readme":"\n# veggie\n\n[![Build Status](https://travis-ci.org/micburks/veggie.svg?branch=master)](https://travis-ci.org/micburks/veggie)\n[![Coverage Status](https://coveralls.io/repos/github/micburks/veggie/badge.svg?branch=master)](https://coveralls.io/github/micburks/veggie?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/veggie.svg)](https://www.npmjs.com/package/veggie)\n[![License](https://img.shields.io/npm/l/rollup.svg)](https://github.com/micburks/veggie/blob/master/LICENSE)\n\n> *Eat your damn vegetables*\n\nInteractive mock server for profiling user scenarios\n\nWith veggie you can add mock data and route handlers to an existing server.\nVeggie provides a API to alter requests while the server is running to allow\nyou to manage user scenarios.\n\n\n### Motivation\n\nVeggie was created to do 3 things:\n\n- serve mock data in a dev server\n- serve the same data in tests\n- allow testing/demoing specific user scenarios\n\nA user scenario (or profile) is defined here as a set of services and their\nresponses. This may include varying errors from different services due to bad\ninput data or downed servers, or it could refer to situations where a user is\nnot enrolled in a campaign or not registered for an application. Any situation\nworth testing.\n\n\n### Installation\n\n```bash\nnpm i -D veggie\n```\n\n\n## Service configuration\n\n### Create routes\n\nVeggie builds an express router by looking at service files. A service file is\na file that exports an object that keys your service url to either:\n\n- a static JSON object\n- a path to a json file\n- an express route that completes the request\n\n\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n\n  // JSON object\n  '/service/user': {\n    d: {\n      id: 1\n    }\n  },\n\n  // Hot-loaded JSON file\n  '/service/posts': path.join(__dirname, '../data/posts.json'),\n\n  // Express route\n  '/service/post/save': function (req, res) {\n    res.send({ message: 'Post saved!' })\n  }\n}\n```\n\n\n#### Hot-loaded JSON files: \n\nIf you are using a path to a JSON file, the file will be loaded every time this\nurl is reached. This allows you to edit your JSON file and have it sent without\nrestarting your development server.\n\n\n## Configuration options\n\n| Option | Type |  Description | Required | Default | Example |\n| ------ | ---- | -------- | ----------- | ------- | ------- |\n| dir | string | Glob matching the service configuration files | yes | | `'services/**/*.js'` |\n| time | number | Max delay in milliseconds before returning mock data | no | `1000` | |\n| log | boolean | Enable logging | no | `true` | |\n| profileDir | string | Directory with which to save/load profiles | no | `process.cwd() // [1]` | |\n| profile | string | Initial profile to load | no | | `userNotRegistered` |\n\n[1] `process.cwd()` is the directory where the server was started\n\n\n## Serve your veggie routes\n\n### Serve mock data from webpack-dev-server\n\n```javascript\n// webpack.config.js\nconst veggie = require('veggie')\n// ...\n  devServer: {\n    setup(app) {\n      app.use(veggie.router(options))\n    }\n  }\n// ...\n```\n\n\n### Serve mock data from a stand alone server\n\n#### Run the server\n\n```bash\nveg -d services/**/*.js -p 1337 -t 1000\n```\n\nto serve from port 1337 with a max delay of 1 second\n\n\n#### Add proxies to webpack-dev-server\n\nIn this case, you could then proxy from your dev server to the mock data\nserver. For example, in webpack-dev-server:\n\n```javascript\n// webpack.config.js\n// ...\n  devServer: {\n    proxy: {\n      '/services': 'http://localhost:1337'\n    }\n  }\n// ...\n```\n\n\n### Serve mock data in tests from karma\n\nThe mock middleware can be used in karma via the following\n\n```javascript\n// karma.conf.js\nconst mockMiddleware = require('veggie').middleware\n// ...\n  middleware: ['veggie'],\n  plugins: [\n    'karma-*',\n    {\n      'middleware:veggie': [ 'factory', function () {\n        return mockMiddleware(options)\n    }]\n    }\n  ]\n// ...\n```\n\n*Note about implementation: For the sake of uniformity, this middleware will\nactually spawn an express server, as the binary would, and proxies all requests\nto that. This is so we can use Express routes and all the useful methods that\ncome along with them.*\n\n\n## Managing profiles\n\nVeggie provides a helpful set of methods to alter the data served from the\nrunning server. This API is the core of creating and changing profiles. These\nmethods create overrides to the services we defined in the service\nconfiguration. The override configuration (i.e. the profile) can be saved and\nsubsequently loaded back into the server.\n\n\n### API methods\n\n*Note: All methods use fetch and return a promise. A promise polyfill may be\nrequired depending on your environment.*\n\n\n#### block\n```javascript\n// Set the '/getUser' response to be an empty object with a 404 status code\nveggie.block('/getUser')\n```\n\n#### blockAll\n```javascript\n// TODO: Not implemented - possibly not even wanted\n// Block all services as above\nveggie.blockAll()\n```\n\n#### set\n```javascript\n// Set the '/getUser' status code and response \nveggie.set('/getUser', 400, { message: 'Bad request for /getUser' })\n```\n\n#### hang\n```javascript\n// Set the '/getUser' route handler to never respond\n veggie.hang('/getUser')\n```\n\n#### reset\n```javascript\n// Reset the '/getUser' response to the default specified in the service configuration\nveggie.reset('/getUser')\n```\n\n#### resetAll\n```javascript\n// Reset all current overrides or remove current profile\nveggie.resetAll()\n```\n\n#### show\n```javascript\n// Show the currently overriden services\nveggie.show()\n```\n\n#### showAll\n```javascript\n// Show the current override configuration\nveggie.showAll()\n```\n\n#### save\n```javascript\n// Save the current override configuration as a profile using the given name\n// Saved to '<profileDir>/adminUser.json'\nveggie.save('adminUser')\n```\n\n#### load\n```javascript\n// Load the profile matching the given name\n// Loaded from '<profileDir>/adminUser.json'\nveggie.load('adminUser')\n```\n\n*Note: profileDir (for save and load) defaults to `process.cwd()` (the directory the server was\nlaunched from). It can alternatively be set using the `profileDir` options*\n\n\n### Call API from browser\n\nBy placing a script tag in your demo index.html, you can call the API methods\nfrom the browser console.\n\n```html\n<script src=\"/node_modules/veggie/dist/veggie.api.js\"></script>\n```\n\nThe veggie API will be available namespaced to `window.veggie`\n\n*Note: promise and fetch polyfills may be required depending on your browser*\n\n\n### Call API from tests\n\n#### Testing in the browser\n\n```javascript\n// This should point to veggie's package.json `browser` field (`veggie.api.js`)\nimport * as veggie from 'veggie'\n\n// If you plan to test in a fetch-less browser\nrequire('isomorphic-fetch')\n// or just\nrequire('whatwg-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n\n\n#### Testing in Node\n\n```javascript\n// This should point to veggie's package.json `main` or `module` field (`veggie.js` or `veggie.es.js`)\nconst veggieApi = require('veggie').api\n// or\n// import { api as veggieApi } from 'veggie'\n\n// In node, you need to specify the port and host before using the api\n// port defaults to 1337\n// host defaults to 'http://localhost'\n// veggieApi returns the api pointed to the specified host and port \nconst veggie = veggieApi(9999, 'http://localhost')\n\n// Fetch is required\nrequire('isomorphic-fetch')\n// or just\nrequire('node-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n","readmeFilename":"README.md","gitHead":"dfda83416ba43a7e334c7c1dcea9e8b388273b83","_id":"veggie@3.0.0-beta.10","_npmVersion":"6.0.0","_nodeVersion":"9.5.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-SVd1il/xSKHbyN0Mk2tHvbLnPoXO7QeHZZpDLBqNUfbtSjqtlvAiS73ESH0HaIl4i80crCEr+a6TcnnR4Z/h9A==","shasum":"98ac6ea4ff495e5fc9811f28731c5fda86e6e264","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.10.tgz","fileCount":7,"unpackedSize":2914731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa98FjCRA9TVsSAnZWagAAWXQP+QFqCkE7M3iiqkZigUSG\naFT6EZVvpZ7+PCGVG+jalhcKrgbJOyqjCsmg2Vp+SQqTrxmDmm2rnY0XIHYE\nDfjuBbzcC447xD/c+jMEZeMnNC9OSPFP2ugcYkCnSnrckVs7BWkYB0m87BeP\nqKV4RruA1zWscXu7WNIXQuEdJlZjzlfL666+pjiUYEWK65L05UKhhj0fSg8A\nFOnDmtcoReJYJp8BYj/Cd5fK+HqlthPN1B7vd615LcyEIsWhCRoFs0PbhPHL\niUrtJ72hWTOlPZhrcmsJaTWqL60RmxpR6tJAWTVInAZRJ8XZqUPfr+khNEtu\nG/9TO0YSMepIHpGFG5qurOplt7JkLZMz6j7S++nQWpQ1rZcLjDZYA8dvit3G\nKCGf72ESeBFKRkaFBlrgSmAA2AsYpD9yYOtiWO4QbVPM5Ycn96iDHCtuBCA8\n4p6ca66CVIKzOUJUdu2S46P2caEpPlycJ8qWGFqp6Non3WCAR3s1lWb9HcHi\nwKPDNq3nNfOfqXP9C2bpEUCOyWVLKWQtFewQiEUqs0qGhjcVD6VRhNW/QRz0\nD9xbsrsdOCa8Y1kGOKREulmyPhAEdA8fpmp2ZRe5fdPvOOlQvQxjE/sJnqii\nXyHWJJxfHspDFoRDE4QfBPbzEfXJB6Qj46DjfA/qkKbXt7mQD1qX+e9kpdRD\nYX0S\r\n=hwh2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH3oEBsjmVbhmyyLzIASs2wRoMtyoIh3QB2wN6KUPU4sCIFHRLbvMyqGsMmWYl0xMyN/vCMRhAhlRP9j5vLkau6B5"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie_3.0.0-beta.10_1526186338725_0.3064355923310309"},"_hasShrinkwrap":false},"3.0.0-beta.11":{"name":"veggie","version":"3.0.0-beta.11","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/micburks/veggie/issues"},"homepage":"https://github.com/micburks/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.0","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^3.5.3","nodemon":"^1.14.11","nyc":"^11.4.1","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"readme":"\n# veggie\n\n[![Build Status](https://travis-ci.org/micburks/veggie.svg?branch=master)](https://travis-ci.org/micburks/veggie)\n[![Coverage Status](https://coveralls.io/repos/github/micburks/veggie/badge.svg?branch=master)](https://coveralls.io/github/micburks/veggie?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/veggie.svg)](https://www.npmjs.com/package/veggie)\n[![License](https://img.shields.io/npm/l/rollup.svg)](https://github.com/micburks/veggie/blob/master/LICENSE)\n\n> *Eat your damn vegetables*\n\nInteractive mock server for profiling user scenarios\n\nWith veggie you can add mock data and route handlers to an existing server.\nVeggie provides a API to alter requests while the server is running to allow\nyou to manage user scenarios.\n\n\n### Motivation\n\nVeggie was created to do 3 things:\n\n- serve mock data in a dev server\n- serve the same data in tests\n- allow testing/demoing specific user scenarios\n\nA user scenario (or profile) is defined here as a set of services and their\nresponses. This may include varying errors from different services due to bad\ninput data or downed servers, or it could refer to situations where a user is\nnot enrolled in a campaign or not registered for an application. Any situation\nworth testing.\n\n\n### Installation\n\n```bash\nnpm i -D veggie\n```\n\n\n## Service configuration\n\n### Create routes\n\nVeggie builds an express router by looking at service files. A service file is\na file that exports an object that keys your service url to either:\n\n- a static JSON object\n- a path to a json file\n- an express route that completes the request\n\n\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n\n  // JSON object\n  '/service/user': {\n    d: {\n      id: 1\n    }\n  },\n\n  // Hot-loaded JSON file\n  '/service/posts': path.join(__dirname, '../data/posts.json'),\n\n  // Express route\n  '/service/post/save': function (req, res) {\n    res.send({ message: 'Post saved!' })\n  }\n}\n```\n\n\n#### Hot-loaded JSON files: \n\nIf you are using a path to a JSON file, the file will be loaded every time this\nurl is reached. This allows you to edit your JSON file and have it sent without\nrestarting your development server.\n\n\n## Configuration options\n\n| Option | Type |  Description | Required | Default | Example |\n| ------ | ---- | -------- | ----------- | ------- | ------- |\n| dir | string | Glob matching the service configuration files | yes | | `'services/**/*.js'` |\n| time | number | Max delay in milliseconds before returning mock data | no | `1000` | |\n| log | boolean | Enable logging | no | `true` | |\n| profileDir | string | Directory with which to save/load profiles | no | `process.cwd() // [1]` | |\n| profile | string | Initial profile to load | no | | `userNotRegistered` |\n\n[1] `process.cwd()` is the directory where the server was started\n\n\n## Serve your veggie routes\n\n### Serve mock data from webpack-dev-server\n\n```javascript\n// webpack.config.js\nconst veggie = require('veggie')\n// ...\n  devServer: {\n    setup(app) {\n      app.use(veggie.router(options))\n    }\n  }\n// ...\n```\n\n\n### Serve mock data from a stand alone server\n\n#### Run the server\n\n```bash\nveg -d services/**/*.js -p 1337 -t 1000\n```\n\nto serve from port 1337 with a max delay of 1 second\n\n\n#### Add proxies to webpack-dev-server\n\nIn this case, you could then proxy from your dev server to the mock data\nserver. For example, in webpack-dev-server:\n\n```javascript\n// webpack.config.js\n// ...\n  devServer: {\n    proxy: {\n      '/services': 'http://localhost:1337'\n    }\n  }\n// ...\n```\n\n\n### Serve mock data in tests from karma\n\nThe mock middleware can be used in karma via the following\n\n```javascript\n// karma.conf.js\nconst mockMiddleware = require('veggie').middleware\n// ...\n  middleware: ['veggie'],\n  plugins: [\n    'karma-*',\n    {\n      'middleware:veggie': [ 'factory', function () {\n        return mockMiddleware(options)\n    }]\n    }\n  ]\n// ...\n```\n\n*Note about implementation: For the sake of uniformity, this middleware will\nactually spawn an express server, as the binary would, and proxies all requests\nto that. This is so we can use Express routes and all the useful methods that\ncome along with them.*\n\n\n## Managing profiles\n\nVeggie provides a helpful set of methods to alter the data served from the\nrunning server. This API is the core of creating and changing profiles. These\nmethods create overrides to the services we defined in the service\nconfiguration. The override configuration (i.e. the profile) can be saved and\nsubsequently loaded back into the server.\n\n\n### API methods\n\n*Note: All methods use fetch and return a promise. A promise polyfill may be\nrequired depending on your environment.*\n\n\n#### block\n```javascript\n// Set the '/getUser' response to be an empty object with a 404 status code\nveggie.block('/getUser')\n```\n\n#### blockAll\n```javascript\n// TODO: Not implemented - possibly not even wanted\n// Block all services as above\nveggie.blockAll()\n```\n\n#### set\n```javascript\n// Set the '/getUser' status code and response \nveggie.set('/getUser', 400, { message: 'Bad request for /getUser' })\n```\n\n#### hang\n```javascript\n// Set the '/getUser' route handler to never respond\n veggie.hang('/getUser')\n```\n\n#### reset\n```javascript\n// Reset the '/getUser' response to the default specified in the service configuration\nveggie.reset('/getUser')\n```\n\n#### resetAll\n```javascript\n// Reset all current overrides or remove current profile\nveggie.resetAll()\n```\n\n#### show\n```javascript\n// Show the currently overriden services\nveggie.show()\n```\n\n#### showAll\n```javascript\n// Show the current override configuration\nveggie.showAll()\n```\n\n#### save\n```javascript\n// Save the current override configuration as a profile using the given name\n// Saved to '<profileDir>/adminUser.json'\nveggie.save('adminUser')\n```\n\n#### load\n```javascript\n// Load the profile matching the given name\n// Loaded from '<profileDir>/adminUser.json'\nveggie.load('adminUser')\n```\n\n*Note: profileDir (for save and load) defaults to `process.cwd()` (the directory the server was\nlaunched from). It can alternatively be set using the `profileDir` options*\n\n\n### Call API from browser\n\nBy placing a script tag in your demo index.html, you can call the API methods\nfrom the browser console.\n\n```html\n<script src=\"/node_modules/veggie/dist/veggie.api.js\"></script>\n```\n\nThe veggie API will be available namespaced to `window.veggie`\n\n*Note: promise and fetch polyfills may be required depending on your browser*\n\n\n### Call API from tests\n\n#### Testing in the browser\n\n```javascript\n// This should point to veggie's package.json `browser` field (`veggie.api.js`)\nimport * as veggie from 'veggie'\n\n// If you plan to test in a fetch-less browser\nrequire('isomorphic-fetch')\n// or just\nrequire('whatwg-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n\n\n#### Testing in Node\n\n```javascript\n// This should point to veggie's package.json `main` or `module` field (`veggie.js` or `veggie.es.js`)\nconst veggieApi = require('veggie').api\n// or\n// import { api as veggieApi } from 'veggie'\n\n// In node, you need to specify the port and host before using the api\n// port defaults to 1337\n// host defaults to 'http://localhost'\n// veggieApi returns the api pointed to the specified host and port \nconst veggie = veggieApi(9999, 'http://localhost')\n\n// Fetch is required\nrequire('isomorphic-fetch')\n// or just\nrequire('node-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n","readmeFilename":"README.md","gitHead":"d58ca85c4eca8f70c15551cf0ae8b16262f2d7d4","_id":"veggie@3.0.0-beta.11","_npmVersion":"6.0.0","_nodeVersion":"9.5.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-7jzrbrIYrpwCdVMpXMLVBp6csUCT+mzvs9y5U72evb4L9BldkadPg/6Jz2y9SrOvDSgMi7EQD9HW32xUNXB61A==","shasum":"d5c07130e15d206bba4eaf3073329bc981d30a29","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.11.tgz","fileCount":7,"unpackedSize":2914917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+HugCRA9TVsSAnZWagAANAMP/jrq47eBRisJ6r2XbyuJ\nZkt0lo2Q8MOieDT86OR/COel/cf96K+GGxgAWmGgzV59o//OgkslF3mtlCXg\ngMu9iV82KCTe0Bim2o7CWc8WKGCiSReIVRJhxQ6b2tJofhJqbNX/11B/Q3JM\n4oIk+xk9WaRJo11DG4Hvd4HWO8nRLDW1FTxhq8pmdymdIMdF9HF8lcSPeVW+\nNr+Liv70Koc7NJ3GbbHBru4l6LL4SOkCzo1+lmSAU3cerIg4nq/P1458+AjU\n6spXp7429W7lSwcaue5iv+hCtzP9J3ZIfiIV13Mlq5LMad367VmwTEU/H4i9\nLVfvT2BB8FEOO62rll++UfMGFod7gH76xTraXfy1TvKkMBaClkqzW0b2pdFL\nmFVoDD4YltnXU8DP9WRlL82lu67wf8KuiatwUoIRIJAsXerGBccRe/vx3Qfy\n36/yWjZVp838FpHJQkePTCzEI3QU/b15uU76JleTh4V+4mbu+1zPcwrwPBpW\nThwoO43CgjX086s3SenAHN8Oi/RxmjFHBTMOXWvi3hpiT3qDHSkcWboTRXz8\nTjU2FUeP5GndzBR6Ht0I/ku1MsLm59+ee/ADbsx8GXxxgskF+y7PJMwdWUHu\n8t/DADxfp7ZFDWAE7kbyFk7Acs3mfktBZRPiZp0J8MDK39cGmVlduZZcXn7U\nb5Ih\r\n=8dRU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAlB9te+fWowMzyfd5j9asBqR5hKM1LsqMbeSSIuIT0wIhALVBuYwojrWkiUX4Lp9a0GUkDrFFX4safHHpq/8fGl0/"}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie_3.0.0-beta.11_1526234015548_0.3980077770439234"},"_hasShrinkwrap":false},"3.0.0-beta.12":{"name":"veggie","version":"3.0.0-beta.12","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/veggie/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/veggie/veggie/issues"},"homepage":"https://github.com/veggie/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.3","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^13.0.0","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.1","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"readme":"\n# veggie\n\n[![Build Status](https://travis-ci.org/micburks/veggie.svg?branch=master)](https://travis-ci.org/micburks/veggie)\n[![Coverage Status](https://coveralls.io/repos/github/micburks/veggie/badge.svg?branch=master)](https://coveralls.io/github/micburks/veggie?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/veggie.svg)](https://www.npmjs.com/package/veggie)\n[![License](https://img.shields.io/npm/l/rollup.svg)](https://github.com/veggie/veggie/blob/master/LICENSE)\n\n![veggie](https://media.giphy.com/media/5noqLunPMAD258M2JX/giphy.gif)\n\n> *Eat your damn vegetables*\n\nInteractive mock server for profiling user scenarios\n\nWith veggie you can add mock data and route handlers to an existing server.\nVeggie provides a API to alter requests while the server is running to allow\nyou to manage user scenarios.\n\n\n### Motivation\n\nVeggie was created to do the following:\n\n- serve mock data in a dev server\n- serve the same data in tests\n- allow testing/demoing specific user scenarios\n- accomplish this all without conflating application code with development code\n\nA user scenario (or profile) is defined here as a set of services and their\nresponses. This may include varying errors from different services due to bad\ninput data or downed servers, or it could refer to situations where a user is\nnot enrolled in a campaign or not registered for an application. Any situation\nworth testing.\n\n\n### Installation\n\n```bash\nnpm i -D veggie\n```\n\n\n## Service configuration\n\n### Create routes\n\nVeggie builds an express router by looking at service files. A service file is\na file that exports an object that keys your service url to either:\n\n- a static JSON object\n- a path to a json file\n- an express route that completes the request\n\n\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n\n  // JSON object\n  '/service/user': {\n    d: {\n      id: 1\n    }\n  },\n\n  // Hot-loaded JSON file\n  '/service/posts': path.join(__dirname, '../data/posts.json'),\n\n  // Express route\n  '/service/post/save': function (req, res) {\n    res.send({ message: 'Post saved!' })\n  }\n}\n```\n\n\n#### Hot-loaded JSON files: \n\nIf you are using a path to a JSON file, the file will be loaded every time this\nurl is reached. This allows you to edit your JSON file and have it sent without\nrestarting your development server.\n\n\n## Configuration options\n\n| Option | Type |  Description | Required | Default | Example |\n| ------ | ---- | -------- | ----------- | ------- | ------- |\n| dir | string | Glob matching the service configuration files | yes | | `'services/**/*.js'` |\n| time | number | Max delay in milliseconds before returning mock data | no | `1000` | |\n| log | boolean | Enable logging | no | `true` | |\n| profileDir | string | Directory with which to save/load profiles | no | `process.cwd() // [1]` | |\n| profile | string | Initial profile to load | no | | `userNotRegistered` |\n\n[1] `process.cwd()` is the directory where the server was started\n\n\n## Serve your veggie routes\n\n### Serve mock data from webpack-dev-server\n\n```javascript\n// webpack.config.js\nconst veggie = require('veggie')\n// ...\n  devServer: {\n    setup(app) {\n      app.use(veggie.router(options))\n    }\n  }\n// ...\n```\n\n\n### Serve mock data from a stand alone server\n\n#### Run the server\n\n```bash\nveg -d services/**/*.js -p 1337 -t 1000\n```\n\nto serve from port 1337 with a max delay of 1 second\n\n\n#### Add proxies to webpack-dev-server\n\nIn this case, you could then proxy from your dev server to the mock data\nserver. For example, in webpack-dev-server:\n\n```javascript\n// webpack.config.js\n// ...\n  devServer: {\n    proxy: {\n      '/services': 'http://localhost:1337'\n    }\n  }\n// ...\n```\n\n\n### Serve mock data in tests from karma\n\nThe mock middleware can be used in karma via the following\n\n```javascript\n// karma.conf.js\nconst mockMiddleware = require('veggie').middleware\n// ...\n  middleware: ['veggie'],\n  plugins: [\n    'karma-*',\n    {\n      'middleware:veggie': [ 'factory', function () {\n        return mockMiddleware(options)\n    }]\n    }\n  ]\n// ...\n```\n\n*Note about implementation: For the sake of uniformity, this middleware will\nactually spawn an express server, as the binary would, and proxies all requests\nto that. This is so we can use Express routes and all the useful methods that\ncome along with them.*\n\n\n## Managing profiles\n\nVeggie provides a helpful set of methods to alter the data served from the\nrunning server. This API is the core of creating and changing profiles. These\nmethods create overrides to the services we defined in the service\nconfiguration. The override configuration (i.e. the profile) can be saved and\nsubsequently loaded back into the server.\n\n\n### API methods\n\n*Note: All methods use fetch and return a promise. A promise polyfill may be\nrequired depending on your environment.*\n\n\n#### block\n```javascript\n// Set the '/getUser' response to be an empty object with a 404 status code\nveggie.block('/getUser')\n```\n\n#### blockAll\n```javascript\n// TODO: Not implemented - possibly not even wanted\n// Block all services as above\nveggie.blockAll()\n```\n\n#### set\n```javascript\n// Set the '/getUser' status code and response \nveggie.set('/getUser', 400, { message: 'Bad request for /getUser' })\n```\n\n#### hang\n```javascript\n// Set the '/getUser' route handler to never respond\n veggie.hang('/getUser')\n```\n\n#### reset\n```javascript\n// Reset the '/getUser' response to the default specified in the service configuration\nveggie.reset('/getUser')\n```\n\n#### resetAll\n```javascript\n// Reset all current overrides or remove current profile\nveggie.resetAll()\n```\n\n#### show\n```javascript\n// Show the currently overriden services\nveggie.show()\n```\n\n#### showAll\n```javascript\n// Show the current override configuration\nveggie.showAll()\n```\n\n#### save\n```javascript\n// Save the current override configuration as a profile using the given name\n// Saved to '<profileDir>/adminUser.json'\nveggie.save('adminUser')\n```\n\n#### load\n```javascript\n// Load the profile matching the given name\n// Loaded from '<profileDir>/adminUser.json'\nveggie.load('adminUser')\n```\n\n*Note: profileDir (for save and load) defaults to `process.cwd()` (the directory the server was\nlaunched from). It can alternatively be set using the `profileDir` options*\n\n\n### Call API from browser\n\nBy placing a script tag in your demo index.html, you can call the API methods\nfrom the browser console.\n\n```html\n<script src=\"/node_modules/veggie/dist/veggie.api.js\"></script>\n```\n\nThe veggie API will be available namespaced to `window.veggie`\n\n*Note: promise and fetch polyfills may be required depending on your browser*\n\n\n### Call API from tests\n\n#### Testing in the browser\n\n```javascript\n// This should point to veggie's package.json `browser` field (`veggie.api.js`)\nimport * as veggie from 'veggie'\n\n// If you plan to test in a fetch-less browser\nrequire('isomorphic-fetch')\n// or just\nrequire('whatwg-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n\n\n#### Testing in Node\n\n```javascript\n// This should point to veggie's package.json `main` or `module` field (`veggie.js` or `veggie.es.js`)\nconst veggieApi = require('veggie').api\n// or\n// import { api as veggieApi } from 'veggie'\n\n// In node, you need to specify the port and host before using the api\n// port defaults to 1337\n// host defaults to 'http://localhost'\n// veggieApi returns the api pointed to the specified host and port \nconst veggie = veggieApi(9999, 'http://localhost')\n\n// Fetch is required\nrequire('isomorphic-fetch')\n// or just\nrequire('node-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n","readmeFilename":"README.md","gitHead":"1e9ebd176ff8ea141f0ef3590e32ac4e6e6730ec","_id":"veggie@3.0.0-beta.12","_npmVersion":"6.1.0","_nodeVersion":"10.4.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-yTMoN0pO/VKJeNJBFcnOR73FCTsxA4n8zznb9uzLjQ9QydHDa7yWIdXlORjf45GG0fqL1wDl3pRfKfhvT7lD/g==","shasum":"a0a874e2109f712874d98e3249d32d22f70239f4","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.12.tgz","fileCount":3,"unpackedSize":10984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWq0TCRA9TVsSAnZWagAAYz8P/2jDd6CAY7R5HORKtuqI\nnT6H2sHZBmf33QqlAnppv0GA1N9wC/Cy70sBE0uSv+zamkd7JXiejtzjTxlj\nQMOkfBpyOyZH4Q1giANlCBIOHt56JCSdf9cstYES+UU5bTKgP9vcmDPmY7Iv\n49HUvJpzMpYdWa4l3OxLR5ZwXI46/vzk2dGA1iCJIDZXcenz2S5Ai0H6hoC/\nfhUjrWHEC29kJPHQAGLgmtnm4KIZ4TmoEtCC9buv8ZhlRN9DJTdxmoQGR/s2\nGomqHE7CBiyPpD6q4L6K4RjTZNCuAVS8Z8qhDRDDQ3AHZNC+TJLMeRYTLHlD\n0bNiTYOW3PyiGbNimKvBBp9NlVscIKXdhQ68C5ob0QGLfJ6xHu7+ALxz1WCY\nh9whzfS/hW/1cAcJTdWskBWRCEgH60Jn3BJM79DX//AW3tocnoAaNeEiS05C\nBuF/y8f4mX820yCTh/SNCCnMblxiAAtzlU2mhjNA7cPDImYCLAt6ELi+49Kb\nWiVhWRqRjjHrmAbpq1rQbryYGAjUFSH+rVYKg6i9kEZy8rZgXq9qvL8FXMNh\n/EUmNFzQnFNgAI2SW1fTR62TAIVmWZwoTOfspTW+Y8FjBa9ATFBa3SXSuKpO\na8mWLDYuAQMBPD28N6Uu3m6+k6IQ5SvaqJI2kovl0/rFwiw/n8WX27KdDrd/\n4v6i\r\n=KUPL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB+mgCkOk+qWJ7uJHb+4RO7VfcPmBuobJ1pV99Jsqj3AIgDb1pZ9ZR1nbXFlNQd6PYWlwysKkQUVudxFBeEEyYicw="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie_3.0.0-beta.12_1532669203737_0.042766076661552965"},"_hasShrinkwrap":false},"3.0.0-beta.13":{"name":"veggie","version":"3.0.0-beta.13","description":"Interactive mock server for profiling user scenarios","main":"dist/veggie.js","module":"dist/veggie.es.js","browser":"dist/veggie.api.js","bin":{"veg":"bin/veg"},"scripts":{"build":"rollup -c rollup.config.js","build:test":"rollup -c rollup.test.config.js","commit":"commit","coverage":"nyc report --reporter=lcov | coveralls","preversion":"npm test","version":"npm run build # Get latest version for banners","postversion":"git push && git push --tags && npm publish","preserve":"npm run build","serve":"bin/veg --dir test/services/*.js --profileDir test/profiles","serve:watch":"nodemon -w src -x 'npm run serve'","pretest":"standard && npm run build:test","test":"nyc --reporter=html --reporter=text mocha dist/veggie.test.js","test:watch":"nodemon -w src --ignore test/profiles -w test -x 'npm test'"},"repository":{"type":"git","url":"git+https://github.com/veggie/veggie.git"},"keywords":["mock","server","interactive","express","services","repl"],"author":{"name":"Mickey Burks"},"license":"MIT","bugs":{"url":"https://github.com/veggie/veggie/issues"},"homepage":"https://github.com/veggie/veggie#readme","dependencies":{"babel-runtime":"^6.26.0","body-parser":"^1.18.2","chalk":"^2.3.0","express":"^4.16.2","get-port":"^3.2.0","glob":"^7.1.2","meow":"^3.7.0","uuid":"^3.1.0"},"devDependencies":{"@commitlint/config-conventional":"^5.2.3","@commitlint/prompt-cli":"^5.2.8","babel-core":"^6.26.3","babel-plugin-transform-runtime":"^6.23.0","coveralls":"^3.0.0","isomorphic-fetch":"^2.2.1","mocha":"^5.2.0","nodemon":"^1.17.5","nyc":"^13.0.0","parallelshell":"^3.0.2","rollup":"^0.55.1","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-istanbul":"^2.0.1","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","standard":"^10.0.3"},"files":["bin","dist/veggie.js","dist/veggie.api.js","dist/veggie.es.js"],"readme":"\n# veggie\n\n[![Build Status](https://travis-ci.org/micburks/veggie.svg?branch=master)](https://travis-ci.org/micburks/veggie)\n[![Coverage Status](https://coveralls.io/repos/github/micburks/veggie/badge.svg?branch=master)](https://coveralls.io/github/micburks/veggie?branch=master)\n[![NPM Version](https://img.shields.io/npm/v/veggie.svg)](https://www.npmjs.com/package/veggie)\n[![License](https://img.shields.io/npm/l/rollup.svg)](https://github.com/veggie/veggie/blob/master/LICENSE)\n\n![veggie](https://media.giphy.com/media/5noqLunPMAD258M2JX/giphy.gif)\n\n> *Eat your damn vegetables*\n\nInteractive mock server for profiling user scenarios\n\nWith veggie you can add mock data and route handlers to an existing server.\nVeggie provides a API to alter requests while the server is running to allow\nyou to manage user scenarios.\n\n\n### Motivation\n\nVeggie was created to do the following:\n\n- serve mock data in a dev server\n- serve the same data in tests\n- allow testing/demoing specific user scenarios\n- accomplish this all without conflating application code with development code\n\nA user scenario (or profile) is defined here as a set of services and their\nresponses. This may include varying errors from different services due to bad\ninput data or downed servers, or it could refer to situations where a user is\nnot enrolled in a campaign or not registered for an application. Any situation\nworth testing.\n\n\n### Installation\n\n```bash\nnpm i -D veggie\n```\n\n\n## Service configuration\n\n### Create routes\n\nVeggie builds an express router by looking at service files. A service file is\na file that exports an object that keys your service url to either:\n\n- a static JSON object\n- a path to a json file\n- an express route that completes the request\n\n\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n\n  // JSON object\n  '/service/user': {\n    d: {\n      id: 1\n    }\n  },\n\n  // Hot-loaded JSON file\n  '/service/posts': path.join(__dirname, '../data/posts.json'),\n\n  // Express route\n  '/service/post/save': function (req, res) {\n    res.send({ message: 'Post saved!' })\n  }\n}\n```\n\n\n#### Hot-loaded JSON files: \n\nIf you are using a path to a JSON file, the file will be loaded every time this\nurl is reached. This allows you to edit your JSON file and have it sent without\nrestarting your development server.\n\n\n## Configuration options\n\n| Option | Type |  Description | Required | Default | Example |\n| ------ | ---- | -------- | ----------- | ------- | ------- |\n| dir | string | Glob matching the service configuration files | yes | | `'services/**/*.js'` |\n| time | number | Max delay in milliseconds before returning mock data | no | `1000` | |\n| log | boolean | Enable logging | no | `true` | |\n| profileDir | string | Directory with which to save/load profiles | no | `process.cwd() // [1]` | |\n| profile | string | Initial profile to load | no | | `userNotRegistered` |\n\n[1] `process.cwd()` is the directory where the server was started\n\n\n## Serve your veggie routes\n\n### Serve mock data from webpack-dev-server\n\n```javascript\n// webpack.config.js\nconst veggie = require('veggie')\n// ...\n  devServer: {\n    setup(app) {\n      app.use(veggie.router(options))\n    }\n  }\n// ...\n```\n\n\n### Serve mock data from a stand alone server\n\n#### Run the server\n\n```bash\nveg -d services/**/*.js -p 1337 -t 1000\n```\n\nto serve from port 1337 with a max delay of 1 second\n\n\n#### Add proxies to webpack-dev-server\n\nIn this case, you could then proxy from your dev server to the mock data\nserver. For example, in webpack-dev-server:\n\n```javascript\n// webpack.config.js\n// ...\n  devServer: {\n    proxy: {\n      '/services': 'http://localhost:1337'\n    }\n  }\n// ...\n```\n\n\n### Serve mock data in tests from karma\n\nThe mock middleware can be used in karma via the following\n\n```javascript\n// karma.conf.js\nconst mockMiddleware = require('veggie').middleware\n// ...\n  middleware: ['veggie'],\n  plugins: [\n    'karma-*',\n    {\n      'middleware:veggie': [ 'factory', function () {\n        return mockMiddleware(options)\n    }]\n    }\n  ]\n// ...\n```\n\n*Note about implementation: For the sake of uniformity, this middleware will\nactually spawn an express server, as the binary would, and proxies all requests\nto that. This is so we can use Express routes and all the useful methods that\ncome along with them.*\n\n\n## Managing profiles\n\nVeggie provides a helpful set of methods to alter the data served from the\nrunning server. This API is the core of creating and changing profiles. These\nmethods create overrides to the services we defined in the service\nconfiguration. The override configuration (i.e. the profile) can be saved and\nsubsequently loaded back into the server.\n\n\n### API methods\n\n*Note: All methods use fetch and return a promise. A promise polyfill may be\nrequired depending on your environment.*\n\n\n#### block\n```javascript\n// Set the '/getUser' response to be an empty object with a 404 status code\nveggie.block('/getUser')\n```\n\n#### blockAll\n```javascript\n// TODO: Not implemented - possibly not even wanted\n// Block all services as above\nveggie.blockAll()\n```\n\n#### set\n```javascript\n// Set the '/getUser' status code and response \nveggie.set('/getUser', 400, { message: 'Bad request for /getUser' })\n```\n\n#### hang\n```javascript\n// Set the '/getUser' route handler to never respond\n veggie.hang('/getUser')\n```\n\n#### reset\n```javascript\n// Reset the '/getUser' response to the default specified in the service configuration\nveggie.reset('/getUser')\n```\n\n#### resetAll\n```javascript\n// Reset all current overrides or remove current profile\nveggie.resetAll()\n```\n\n#### show\n```javascript\n// Show the currently overriden services\nveggie.show()\n```\n\n#### showAll\n```javascript\n// Show the current override configuration\nveggie.showAll()\n```\n\n#### save\n```javascript\n// Save the current override configuration as a profile using the given name\n// Saved to '<profileDir>/adminUser.json'\nveggie.save('adminUser')\n```\n\n#### load\n```javascript\n// Load the profile matching the given name\n// Loaded from '<profileDir>/adminUser.json'\nveggie.load('adminUser')\n```\n\n*Note: profileDir (for save and load) defaults to `process.cwd()` (the directory the server was\nlaunched from). It can alternatively be set using the `profileDir` options*\n\n\n### Call API from browser\n\nBy placing a script tag in your demo index.html, you can call the API methods\nfrom the browser console.\n\n```html\n<script src=\"/node_modules/veggie/dist/veggie.api.js\"></script>\n```\n\nThe veggie API will be available namespaced to `window.veggie`\n\n*Note: promise and fetch polyfills may be required depending on your browser*\n\n\n### Call API from tests\n\n#### Testing in the browser\n\n```javascript\n// This should point to veggie's package.json `browser` field (`veggie.api.js`)\nimport * as veggie from 'veggie'\n\n// If you plan to test in a fetch-less browser\nrequire('isomorphic-fetch')\n// or just\nrequire('whatwg-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n\n\n#### Testing in Node\n\n```javascript\n// This should point to veggie's package.json `main` or `module` field (`veggie.js` or `veggie.es.js`)\nconst veggieApi = require('veggie').api\n// or\n// import { api as veggieApi } from 'veggie'\n\n// In node, you need to specify the port and host before using the api\n// port defaults to 1337\n// host defaults to 'http://localhost'\n// veggieApi returns the api pointed to the specified host and port \nconst veggie = veggieApi(9999, 'http://localhost')\n\n// Fetch is required\nrequire('isomorphic-fetch')\n// or just\nrequire('node-fetch')\n\n// ...\n  before(() => {\n    return veggie.block('/my/blocked/route')\n  })\n// ...\n```\n","readmeFilename":"README.md","gitHead":"dc5354e0764ae3ee2b3b2971ed8aab5d99451a0a","_id":"veggie@3.0.0-beta.13","_npmVersion":"6.1.0","_nodeVersion":"10.4.0","_npmUser":{"name":"micburks","email":"mickey@burks.online"},"dist":{"integrity":"sha512-YNO06JQp5Y0GBCqf4+GWCi5LeTXh9Yhv8u2AWlupC7nrzoI96MdRQOmKQJFm3Koz1PCFrHPl1iwWBudUt7Uexg==","shasum":"3a1a3d4b0d97f2a8992daf323950a81907bfd34f","tarball":"https://registry.npmjs.org/veggie/-/veggie-3.0.0-beta.13.tgz","fileCount":7,"unpackedSize":2915124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbW8ksCRA9TVsSAnZWagAAd2QQAIEahQDGupFjpUQxRDo6\nbO0TAiN0YF+ke1ZaBDwwrPfwtOpKrKxG5OaH8L2xbMf/J0aaK32UsOGdxAfY\nJTgrrgiHp3wnUSMIYJDCNnKsbnggawlVOQq9d1+etT75SeIMLzxKH43TrlOB\nOJGKkMKDF1VxybzyNTAMP9WJaxTGaDacm1JRlmJ79bC22HNImtODGszUibLZ\nBV6oQpVBAkTabj05I2dSCdfpkP+TyxjEmMxOvRnABhUwthCRXaLI/RBYaQSO\neusGeoFvHFZdr5eAIoss7jYzGVm3x+mt9U0ttVD13ApBQRB6fc/sdTJrxv23\ncrIq07HD2wCbxQ4xP5j8rafZWNlml3VTYRQ1JzxBabObc5IpTCwu3LmvYJWW\nPPi1/uAfmJEYNo+/j526VbVDdtDi4OCMB98KVppyrFEV4Vjb7JNTcEzmMXxV\n0xpBHV8MHbLlVBqFvQ8hRY/xitr11xgeXRo+1/9dnT/WuZg0PS5blt23eKl3\nLVTP7/fpU+JMhvnAzigaFWZJrvEA8qcXisqQd0kjRDgUrvOOgW8BFb7FlSH+\nRua9IMclH8y83BtAj7c9OivyR1UPVl0+CB1rMVucHn6PJKbTTtZq/NfC57t6\nTVM+opeUa6S7p4+YnNkuTNVDkNwVo/8O47laHwUPgxW0ngCud95KGADnPgkO\nfJp7\r\n=50W9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgUcw/DIkrkr0t/QMFU04LP+++TpbFdQCxAL3te20XIAiBkZKDyV0LCnCo3GBKt9en8m4XcuG17rE2i/jVAsxAKCg=="}]},"maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/veggie_3.0.0-beta.13_1532741932362_0.5990973731931015"},"_hasShrinkwrap":false}},"readme":"","maintainers":[{"name":"micburks","email":"mickey@burks.online"}],"time":{"modified":"2022-05-23T04:34:31.333Z","created":"2017-10-25T21:45:44.499Z","1.2.0":"2017-10-25T21:45:44.499Z","1.2.1":"2017-10-25T22:00:45.526Z","2.0.0":"2017-10-26T00:15:14.367Z","2.0.1":"2017-10-26T17:33:43.338Z","2.1.0":"2017-10-26T20:47:29.768Z","2.2.0":"2017-10-30T18:56:24.119Z","2.3.0":"2017-11-01T18:31:51.464Z","2.3.1":"2017-11-03T21:10:41.957Z","2.3.2":"2017-11-06T22:19:25.297Z","2.4.0":"2017-11-14T16:21:09.155Z","2.4.1":"2017-11-14T16:23:40.095Z","3.0.0-beta.1":"2018-01-23T01:54:15.313Z","3.0.0-beta.2":"2018-01-23T02:46:54.482Z","3.0.0-beta.3":"2018-01-28T16:23:49.173Z","3.0.0-beta.4":"2018-01-28T21:02:39.663Z","3.0.0-beta.5":"2018-01-28T21:22:45.178Z","3.0.0-beta.6":"2018-01-31T04:23:42.548Z","3.0.0-beta.7":"2018-02-05T14:15:05.702Z","3.0.0-beta.8":"2018-02-25T17:14:09.688Z","3.0.0-beta.9":"2018-02-25T17:30:35.869Z","3.0.0":"2018-05-13T04:32:56.715Z","3.0.0-beta.10":"2018-05-13T04:38:59.035Z","3.0.0-beta.11":"2018-05-13T17:53:35.773Z","3.0.0-beta.12":"2018-07-27T05:26:43.912Z","3.0.0-beta.13":"2018-07-28T01:38:52.528Z"},"homepage":"https://github.com/micburks/veggie#readme","keywords":["mock","server","interactive","express","services","repl"],"repository":{"type":"git","url":"git+https://github.com/micburks/veggie.git"},"author":{"name":"Mickey Burks"},"bugs":{"url":"https://github.com/micburks/veggie/issues"},"license":"MIT","readmeFilename":"","users":{"cryogena":true}}