{"_id":"@cepharum/mockup-service","_rev":"6-6ce1195300cdd22c5e18d6db76a0ba1f","name":"@cepharum/mockup-service","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@cepharum/mockup-service","version":"0.1.0","description":"script-based mocking of network services","main":"index.js","private":false,"scripts":{"style":"eslint .","test":"mocha --ui=tdd --recursive test/**/*.spec.js"},"repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","devDependencies":{"eslint":"^6.0.1","eslint-config-cepharum":"^1.0.9","eslint-plugin-promise":"^4.2.1","mocha":"^6.1.4","should":"^13.2.3","should-http":"^0.1.1"},"dependencies":{"path-to-regexp":"^3.0.0"},"gitHead":"f082456d8f80ec9cc9ba92fcbf8da61597e1699e","_id":"@cepharum/mockup-service@0.1.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-k1pzG0lI+w8IXK1LWzdGJj9GyQ2Bfnm5FU7nXqSr4lxvyUtvmMv8dD2P9EQWnJpX7USwwyoKqsgGvz/wDo+BGg==","shasum":"61c3551d47589c45dd27a32b650516c2dbd7bf02","tarball":"https://registry.npmjs.org/@cepharum/mockup-service/-/mockup-service-0.1.0.tgz","fileCount":20,"unpackedSize":60270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIq/eCRA9TVsSAnZWagAAZSIP/3PoU+NNfmPK25ohOTc5\nZWRl2h8CRiVB4kYh61QzuYR/umc+4JHHLgo44vzm2RJ1eHyXmDqmDoCzT1kP\n+broOH1ZVFO4CbVKefQDUnD7/TFQgp0ZQkt7iwBKcERZm4unTSR+cNXE8G37\nQLTv1SZeIeMZjZf9hlipUj2W+2eQR57mPVhvQm9bPSA9mZAqPQYiyAKUHPCY\nkLVxbEptKNxS7QSICU7hv2XbrESGRW5Hayw+LAclPvBRMmaCwd2AqauwH9eY\nAawE3ApbOfSXSzllCEn9bklMZGP+d84wkXw3yyf0uIJbvz/niitUn7B9EjHu\ns6KHzU/eSFwOn+mt2w5vhvUNCUvHW/+rAcCv/jBoI5mpjOi/4DxFdcbH58xZ\n8ewyX/YwhxG4csJq0MqvhMr/HPG0KuNFYei33r1alFDcil396k2w+TaTHTWX\ncKuzGunc8RQOxqHu2bzvGr7/HhMjJ+LVU/M7zC61IuVt90ADD+7B1+7bYrlt\nLjdNJGrxJNahPXgsIzYIBvGBZSnxPpkRqQoTciVWLADgnjz42gZa6RMzxayd\nEMFTQ/k5ec8cEKzS/fDZONHR2s2f+16YWmIRU4gTEux8t7p4TYxzfY61wmjr\nfpYN4ZixgcmBr+BQkc9hJrlEAH23D00CENW2L3HFAtBZHo6qSxiKQjVzYpWH\nmM0w\r\n=BgSC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrswZolDbLefP7tSOEOZsqc0k9tPIFYar8p7dLxNanjAIhAKQBdMbTHYKQIyw75LLJa1fsLCww/2PrPK13OSPCCLh0"}]},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"_npmUser":{"name":"soletan","email":"thomas.urban@cepharum.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mockup-service_0.1.0_1562554333642_0.727455915333636"},"_hasShrinkwrap":false},"0.1.1":{"name":"@cepharum/mockup-service","version":"0.1.1","description":"script-based mocking of network services","main":"index.js","private":false,"scripts":{"style":"eslint .","test":"mocha --ui=tdd --recursive test/**/*.spec.js"},"repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","devDependencies":{"eslint":"^6.0.1","eslint-config-cepharum":"^1.0.9","eslint-plugin-promise":"^4.2.1","mocha":"^6.1.4","should":"^13.2.3","should-http":"^0.1.1"},"dependencies":{"path-to-regexp":"^3.0.0"},"gitHead":"66ecd2451951d0f2acef7af0ac292ce0d3321aa3","_id":"@cepharum/mockup-service@0.1.1","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-E9mHFRaY927VieITvWJuOwYj7z1NNGMftSDBRUSWccU+RYrW6uDMYRTkjwifIPBHJ18x+58FJ/Pxn60Wma4kaA==","shasum":"bc9e664522ca07e8edb4c4fca1bbd71377df0fa3","tarball":"https://registry.npmjs.org/@cepharum/mockup-service/-/mockup-service-0.1.1.tgz","fileCount":21,"unpackedSize":65745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdIu61CRA9TVsSAnZWagAARbYP/jXeDxcgEDCy4XMrCBHG\n6h2bumk7WZu7FGNsR46q0xzF20xaW83xkZuowgQiDSCl6lB7A9WmLB4RHBHR\n2qFPqaVIsoy6b8no2yu6hfcCcFSW6veV+C9w9jXG4hi0cyctZIFNmlW80ZYg\nkTbt4+dOUc/n+P38WbVn5LNjM6AhkBikFenk0BNX76lStMjOOXEVD87brX2c\nQDie2RJARLSI9BaL7uHjjpCJbhgj5dfcYHjesrAa9HmfndNCaxOqngm3MlBU\nHS1pnTgj8R5ThxuN39WRme0ALZ2UkKo0HLmJx/WjSZL+vo7lKkTujepIJ5WE\nwfdTOCBjkmIcTpgjPAbxs/VZslxA3fyyooRR0MHZGcOwsGq65Nz0j8w93hxn\nBtX12qGPOITWzHP6hHdmM1PgnF/Cl57OHR/eXfAtn6BiXtYTWVfcSJSThPId\neK52B4Xykr09s5aMox1sES2hUYqD4tN8toP1GHJbNRrBH/dMYbnzIW/aQWq/\nq3Pyxgs2YRRjmjYbyNPzcX714EYQDy6B/u71cskRW7KlOWxhDjrYTjWZX2Na\nIiMv0qr6REYU0upvwMksLrnbQ5RCQ/hJ6b+Ek115IDSP1jQRbQRLrBRnmMOy\nAdXKF/Cssu1sV04PwjPTN8wulbPg/lKps9zJBfkMG+1d+ajrfxuRLoDI+BYU\nlXe4\r\n=HBdq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0+WtU1V2NXR2M4jbPjTHa+UC/sYv7q9ahr1aGY3mEpwIgeUW3WBjFRnt5FwVxEg1JArWP+UEfABKSj/N0yrbOkxg="}]},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"_npmUser":{"name":"soletan","email":"thomas.urban@cepharum.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mockup-service_0.1.1_1562570420872_0.8703343652462212"},"_hasShrinkwrap":false},"0.1.2":{"name":"@cepharum/mockup-service","version":"0.1.2","description":"script-based mocking of network services","main":"index.js","private":false,"scripts":{"style":"eslint .","test":"mocha --ui=tdd --recursive test/**/*.spec.js"},"repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","devDependencies":{"eslint":"^6.0.1","eslint-config-cepharum":"^1.0.9","eslint-plugin-promise":"^4.2.1","mocha":"^6.1.4","should":"^13.2.3","should-http":"^0.1.1"},"dependencies":{"path-to-regexp":"^3.0.0"},"gitHead":"65cd0c92926aa261eebbd0568e68ed5cd2093d3c","_id":"@cepharum/mockup-service@0.1.2","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-VnYtoyw44z4yE/hSvjyAv+qv9I2YA0+Gw/Es42SOtPxL3h3HK6IRCtUFUI0df2XhsMmAFiH0N55aVsm2prfzdg==","shasum":"43c27477a68b00d0f71ca1e7ee1b0832eeabf0c6","tarball":"https://registry.npmjs.org/@cepharum/mockup-service/-/mockup-service-0.1.2.tgz","fileCount":22,"unpackedSize":77815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdK4vXCRA9TVsSAnZWagAAisYP/25txmsm52/YtUiLSrHk\nLayI6BkwA1hcrqp7fmAIprOoDpXMbKaCRknne68QGqGOZpeqHlBvVaBnbGTr\nDUYptSKn4+xCV4Rvi2f0dPg1n7lJNAr0JgiF8sgpCC23xGCz0UlR3KTQEI2k\nNjSxGleLhju0Vv1ZpfCEl7RX61j7m/d3u8AwMnczg3v6DBYFA1VG2rJO0+d3\nanIbAmssS9m3dnJjW77QUEC3Dp/vQCGVJt+Arm7+Ruj7yKneKG7vRStULQbX\nywMgV2Epr3+ACWxz1ECn2YF0QhffVrt8kFu0Ohd2X0YCTUzmVtqwq9Ny24ML\nWGLFx/KpMAbx0KMT17oXp8MAFYtFOeeaz7B7ws/sMQYS42mJPD/K7getm9Nr\nfp6c5E+YZes3Ug9AFvjqp2zpTRdQIWinEvnvkTFOADpnh/DYFHeNayeWSrGX\nEXqCLSFcHJ9XKLXD6Dq2IkN1kYNdrAYhog5aTb+vNnTNeMgyK8Onm9rI/6YO\nT2k+ZJoZTWROVlvYmGaJajjTZ0ykfZajeLSlgEGDe2GlsdDmSBcBODriLoUb\nRFvZEKa8idkxIjvFkr0eFssp+U7atUINAJCGzLky4IXsEm4+BikbWfP77Ual\nXD2gy0K857qje6/jMhFof2ZneM6kjX+9SWbP+BNB0H8g98nCLKUz8AMjTUyb\nPKSW\r\n=VPtr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+ndbtQJdpDMiFfWdzEBBRTgck7N87qJpN8F2xPcpf5AiBGFc82Y9/eKb34wjgwnH+wEgwzlbxJHc5jzTU0yFgxgQ=="}]},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"_npmUser":{"name":"soletan","email":"thomas.urban@cepharum.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mockup-service_0.1.2_1563134934301_0.550195945180199"},"_hasShrinkwrap":false},"0.1.3":{"name":"@cepharum/mockup-service","version":"0.1.3","description":"script-based mocking of network services","main":"index.js","private":false,"scripts":{"start":"node server.js","style":"eslint .","test":"mocha --ui=tdd --recursive test/**/*.spec.js"},"repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","devDependencies":{"eslint":"^6.0.1","eslint-config-cepharum":"^1.0.9","eslint-plugin-promise":"^4.2.1","mocha":"^6.1.4","should":"^13.2.3","should-http":"^0.1.1"},"dependencies":{"path-to-regexp":"^3.0.0"},"gitHead":"4fdcc4ef4be69c1fdf6b30a22f547db80edecc63","_id":"@cepharum/mockup-service@0.1.3","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-uDajA7zT4ZJXHadG9qJ7UxcowNOE87/f7Opmiu58ecLqTgUweGpSdGq7c8dvlLi1SCfGi0Zp7xQTaHnz/2DmoQ==","shasum":"86f7406009f3d55a4a8b258d8fbe3fddf849b172","tarball":"https://registry.npmjs.org/@cepharum/mockup-service/-/mockup-service-0.1.3.tgz","fileCount":27,"unpackedSize":88636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMMaECRA9TVsSAnZWagAA9/EP/R78ifSZSfkhmTfT6o+H\nxGypqaJ8w2uepjbGbXOKQD9LCbQyxuVGHAlJrORkHKuisdKtysX8SeApnDp/\n/eg6BRbwt6RV0KwmqoGKiE6GQEe6lNxWPyHLElg25hGP2h+fPbsV9tUz7Ib/\nZEwCYVm332xXi4oVBOM2Pupo0e6xWEm08YuolwX1c/JNxIdNTBfmygXTyi+w\n2ADRcmpu/UDyzjrb69ftH1psJCmZKu8KduRx5DSCicTenbG8pcv+O6LBu39H\npqgRBLXmjFsQdEo46f1TAS9O5RVeStbxA0kQaw+37UyRTadEouoCpPEhwIGT\nga5JJGZ9DbfuoGBGrdAp9lcHKjr5Ifny5HuzXZFtgKjPMJJoBiwVT2VhMB6j\nC59J0zVADEAvR0JFU0mDmSKoGZO98hPmzRxf/rYtH0ImmQEaPPWtPUC78Alf\n4nf3cLN8NF8EoHVEVX9O6X2WbufqwtB6TF21jn+qr4YhZnQai0+sVzhl29Jj\nZosAn5GnM8BsCaUjoDKVNIq/1ihS+Dji7xVuvsUCTioC1/RJUtHaxiicwVlt\nIDTQwdNwlKQ9nhc1Assut0WFvhKVPGDO438fHI0jqRz6JS16b4nxMr1zB3WV\nRUGKdM17+TIy4051abW9N3OyAfsXuxrCYV68338XYAS9osCeM6R5RJAPogt+\n5ghZ\r\n=RCud\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH6eOqNOtaKvi22zpYUhaHo9QQK47gxlB8eaUEzcSnSUAiBiDH9k7rkacM9XCHQ+RKiEOrQDjFNcpwwzvYpqeWaMfQ=="}]},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"_npmUser":{"name":"soletan","email":"thomas.urban@cepharum.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mockup-service_0.1.3_1563477635484_0.09238178766105531"},"_hasShrinkwrap":false},"0.1.4":{"name":"@cepharum/mockup-service","version":"0.1.4","description":"script-based mocking of network services","main":"index.js","private":false,"scripts":{"style":"eslint .","test":"mocha --ui=tdd --recursive test/**/*.spec.js"},"repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","devDependencies":{"eslint":"^6.0.1","eslint-config-cepharum":"^1.0.9","eslint-plugin-promise":"^4.2.1","mocha":"^6.1.4","should":"^13.2.3","should-http":"^0.1.1"},"dependencies":{"path-to-regexp":"^3.0.0"},"gitHead":"a1eba337c6ebd58034b2ee17669ffdf72a3f0a40","_id":"@cepharum/mockup-service@0.1.4","_nodeVersion":"10.16.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-pvkVp8+pRZP6VbKL2sJtyKa2K5jnIsMCBrOldbOQEiIUrm67xrirNY8pwtuGBUOtDWptwDe1EZw3d0y+AVfUcg==","shasum":"c60a412e673c93670e7b701a96f8f630378a09da","tarball":"https://registry.npmjs.org/@cepharum/mockup-service/-/mockup-service-0.1.4.tgz","fileCount":24,"unpackedSize":86342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTmtuCRA9TVsSAnZWagAA8uQQAJmiqnddp3XVglDOJhof\nsT6L8jA/p4F3ZBFN1/HUL91heVgun/2IwAgV7xwbsuP8Sk621lusugegjhN4\nwIgMDtNUGjQmfSEdMi2j2OHUuZl8R58ZtPV74h/u2nG97NSQ2iJOoBKD+iZ2\n04S6XsqxK743aCSPK0TnYv93Y0j0bE0NWLbgIAsDegQiP+eJBhLedxtdwe18\nkMCRsU1OaBkc1u/YOK9+y0Dk20UD8MKJz+xWRqAZjUqcwRAqev68xV99XyDH\nGN/5ph4V662/KpM82T+OSY7wzfqCeyJwm/NbfWZnOddaw8U09J4ag5EJ+2Oh\n4AZvm9DIjhpNF1mT0IsjtHmAQQkz4ZycK39E5YjbnfnQ76hbluWKNJzYdSWi\nNwq2DcH94neGHC2qhf5YKNj+LxDP9eY77kDWyuE8gGQ7M6lssTiYaJyLoUVM\neuFOQtwC0YiV6dk7h4lC/PFmy6TxnpZnBrOjyuxmCNiYQOVcJM5Zh/vCIRb2\nfjl2QOizf49kL8JbBBPuKCOWH+uBeEqRomqvvVkLOQTAxZUTPU+sTYw/fWc+\nSysR478JxmFrqewORC262g5QpbjuwmiWNMEoqZJLYxf+paph1a9D/LmpSJkN\n/cJfI8X84Pg1StEM0jF9eXHxDkWmfFUGM9hhg49tfEaZtZJX75iVzOdlAqr9\nAtQY\r\n=znZJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWyhVm8i5F/4x+a4CAQULH6iIxZz6O7UrFnftFpzieNAIhANiDl/fsdWkiQwhKbcp91aUPD5OOkVFKz4KslHPAu3tx"}]},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"_npmUser":{"name":"soletan","email":"thomas.urban@cepharum.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mockup-service_0.1.4_1565420397925_0.4693489999696192"},"_hasShrinkwrap":false},"0.1.5":{"name":"@cepharum/mockup-service","version":"0.1.5","description":"script-based mocking of network services","main":"index.js","private":false,"scripts":{"style":"eslint .","test":"mocha --ui=tdd --recursive test/**/*.spec.js"},"repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","devDependencies":{"eslint":"^6.0.1","eslint-config-cepharum":"^1.0.9","eslint-plugin-promise":"^4.2.1","mocha":"^6.1.4","should":"^13.2.3","should-http":"^0.1.1"},"dependencies":{"path-to-regexp":"^3.0.0"},"gitHead":"846e067cb6ddcedc6d648c19f22dec6ddc051429","_id":"@cepharum/mockup-service@0.1.5","_nodeVersion":"10.16.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-dEOeq9ZA0rPqW4e09a0h0dvEEMWHCNzdmfX5ZLpuZT6YkIsCylAu+MbF/0NzmwuP9/pxy5FOYz7TzCU7ElYVqw==","shasum":"646c3deac79d09cb6431d15c6d5c7a2b5072dedf","tarball":"https://registry.npmjs.org/@cepharum/mockup-service/-/mockup-service-0.1.5.tgz","fileCount":18,"unpackedSize":74568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZTRACRA9TVsSAnZWagAANRAP/1+P+kIdrWkSas1/ueqz\ngnQu7GDBxic/R8QWZzT3LSgioRNydVmB3KiKtVZ3U6iQ2khkPMu6xM2KaNL+\neF9phSYToKgwEhCPLy54ZyU/zjZPWJWiYJeLo3ch4vAHwCVY7yaKsYQkjgVV\nbeQx20xhMhpSRQ1xjooDJDGiAF+V+vbOUzx3oZ2hw1/vON8VVOSM/OTytyEP\nIpiRPA5aUDeF320r4B8vVK4sXTN4vgEYEbCCDGluZUoUdczcgDDkakrwY4jZ\nER4ikBZjfbrZoQT+bBXrdENLbgxAtnNVQ8asqD1i6CLlai8j0y0LbNnXXH7e\n0uzfXL5dcS/Cf74IyFtLB0e+QsJiUEGNsIaI75T+TpeLNZJgPbP72UAFJEuX\nNbJMtzj65BI79E0sWx3EqUD1g3QRVYucFBEvVTk25wjAG7kAVexb7v+AKMVE\neXkjM9qlhkWZCbkyfkuDl/mAPyF7RwAbt/fub6LvVuYwpdp5fjgmpIp5N4mJ\n7KyLhlKOVIYMcCZN7K8KXpIlbuhNJz/CLet0/XTcuGoAfycZy9edVD5jSKE0\n06WJpbazIPH+1XDZBWkMcPGBsSG8FhFN7fMOaPhMark9jyDc+slmIKQQxPff\n2XTtguUMbpO2o8p4R9mZY+vdlr0/9YB3HRvB8UeJKW0zAKnGrmSzeTQiu6ms\nf51E\r\n=CmZb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHP1pvJH1CrnYQpXqxjLjdYU9+MOvaicOuK9FwvFV5bpAiEAlGzBbR6VhzSODIp4VS7MuYFrw8kUtCbjBoimZ+cAOf4="}]},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"_npmUser":{"name":"soletan","email":"thomas.urban@cepharum.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mockup-service_0.1.5_1566913599381_0.862429478169602"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-08T02:52:13.580Z","0.1.0":"2019-07-08T02:52:13.820Z","modified":"2022-04-04T22:20:24.605Z","0.1.1":"2019-07-08T07:20:21.159Z","0.1.2":"2019-07-14T20:08:54.390Z","0.1.3":"2019-07-18T19:20:35.593Z","0.1.4":"2019-08-10T06:59:58.078Z","0.1.5":"2019-08-27T13:46:39.484Z"},"maintainers":[{"name":"simon.friedo","email":"friedosimon@aol.com"},{"name":"soletan","email":"thomas.urban@cepharum.de"}],"description":"script-based mocking of network services","repository":{"type":"git","url":"https://git.cepharum.de/cepharum/mockup-service.git"},"author":{"name":"Thomas Urban","email":"thomas.urban@cepharum.de"},"license":"MIT","readme":"# mockup-service\n\n## License\n\nMIT\n\n## About\n\nThis module is designed to help with mocking network services some code to be tested relies on. It supports an extensible domain-specific language describing an ordered list of _rules_ with each rule containing a _test_ applied on incoming requests and a _response_ to be sent back in case of test succeeds.\n\n## Install\n\n    npm install -D @cepharum/mockup-service\n\n## Usage\n\nConsider the following definition of rules for an HTTP service:\n\n```\nheaders.content-type = text/plain ==>\n\tHello tester!\nEOT\n\nheaders.content-type = text/html AND method = POST ==>\n\tHello posting HTML-tester!\nEOT\n\nheaders.content-type ~ /image\\/jpe?g/ ==>\n\tHello JPEG-tester!\nEOT\n\n/just/some/path ==>\n\tHello path-tester!\nEOT\n\n/some/interpolated/response ==>\n\tHello {{headers.x-value}}-tester!\nEOT\n\n/api/:prefix/test ==>\n\tHello {{rule.params.prefix}}-tester!\nEOT\n\n/some/actual/message AND query.type === \"actual\" ==> MSG\n\tset-cookie: mycookie=value:set\n\tx-folded-value: so\n\t\tme\n\t  folded value\n\n\tHello {{query.type}} message-tester!\nEOM\n```\n\nIn a unit test this definition could be used like this:\n\n```javascript\n\"use strict\";\n\nconst { describe, before, after } = require( \"mocha\" );\nconst { HttpService } = require( \"@cepharum/mockup-service\" );\n\nconst Mock = new HttpService( `\nheaders.content-type = text/plain ==>\n\tHello tester!\nEOT\n\nheaders.content-type = text/html AND method = POST ==>\n\tHello posting HTML-tester!\nEOT\n\nheaders.content-type ~ /image\\/jpe?g/ ==>\n\tHello JPEG-tester!\nEOT\n\n/just/some/path ==>\n\tHello path-tester!\nEOT\n\n/some/interpolated/response ==>\n\tHello {{headers.x-value}}-tester!\nEOT\n\n/api/:prefix/test ==>\n\tHello {{rule.params.prefix}}-tester!\nEOT\n\n/some/actual/message AND query.type === \"actual\" ==> MSG\n\tset-cookie: mycookie=value:set\n\tx-folded-value: so\n\t\tme\n\t  folded value\n\n\tHello {{query.type}} message-tester!\nEOM\n` );\n\ndescribe( \"Mock-up service for HTTP\", () => {\n\tbefore( () => Mock.start() );\n\tafter( () => Mock.stop() );\n\n\tit( \"responds ...\", () => {\n\t\t// return require( \"node-fetch\" )( Mock.url ).then( response => {} );\n\t} );\n\n\t// TODO: add more tests here\n} );\n```\n\nUsing `Mock.url` in actual tests to be added the mocked service's URL is available for use with your particular client library to be tested. Instead of using `Mock.url` you might also use `Mock.address` to fetch the IP address service is listening on and `Mock.port` to get the related port service is listening on.\n\nThe service mock-up also includes a client `Mock.query()` for querying the service but this mostly for testing the implementation of mock-up service itself.\n\n\n## API\n\nThe API basically consists of services to be instantiated in combination with a _script_ describing how the resulting service is meant to respond to either incoming request.\n\nAs demonstrated before, in case of HTTP service this looks like this:\n\n```javascript\nconst { HttpService } = require( \"@cepharum/mockup-service\" );\nconst Mock = new HttpService( scriptDefiningRules );\n```\n\n### Methods\n\nEvery such instance of a service provides the following methods:\n\n#### Mock.start() : Promise<{address, port}>\n\nStarts service for processing defined rules on every incoming request. The method promises information on then fully started service. This information is promised as object containing running service's IP address in property `address` and its port in property `port`.\n\n#### Mock.stop() : Promise\n\nShuts down previously started service. Promises service shut down eventually.\n\n#### Mock.query() : Promise<Response>\n\nThis method is provided to query the started service e.g. for testing whether some defined response is actually delivered. This is used a lot in testing this library. The method's signature stringly depends on type of service:\n\n##### HttpService: Mock.query( method, url [, headers [, body] ] ) : Promise<Response>\n\nThis version accepts desired HTTP method and URL for request. In addition, an object listing request headers and some request payload might be given.\n\n\n### Properties\n\n#### Mock.url\n\nThis property is exposing the service's URL. Its content strongly depends on type of service. This information is reliable after having started service, only.\n\n#### Mock.address\n\nThis property is exposing the address the service is listening on. This information is reliable after having started service, only.\n\n#### Mock.remoteAddress\n\nThis property is exposing the address for accessing the service from a client's point of view. This information is reliable after having started service, only.\n\n#### Mock.port\n\nThis property is exposing the port the service is listening on. This information is reliable after having started service, only.\n\n\n### Events\n\nEither service instance is deriving from `EventEmitter` as provided by Node and thus it is possible to manage listeners for selected events to be emitted by either service.\n\n#### request\n\nThe `request`-event is emitted prior to searching defined rules for the earliest one matching incoming request. Any listener is invoked with these arguments:\n\n1. descriptor of incoming request\n2. manager for controlling response\n\n#### response\n\nThe `response`-event is emitted after having sent response to client. Any listener is invoked with these arguments:\n\n1. descriptor of incoming request\n2. manager for controlling response\n3. an array of `Buffer` instances sent in response\n4. descriptor of matched rule which delivered the response\n\n#### error\n\nThe `error`-event is emitted when handling any request resulted in error. This might happen once per received request. Any listener is invoked with a description of error as instance of `Error` as sole argument.\n\n\n## Syntax\n\nThe _script_ for mocking-up a service is a sequence of rules processed from top to bottom. Every rule defines a test to be performed on any incoming request and a response to send back in case of a matching test.\n\n    <test> ==> <response>\n\nSeveral kinds of tests are supported:\n\n### Tests\n\n#### Custom Comparison Tests\n\nCustom comparison tests consist of a source's name exposing some actual value, a comparing operator and a literal value to compare read source with.\n\n    <source> <operator> <value>\n\nThe source may consist of several segments separated by full stop with each segment selecting another level of previously addressed information while descending into a hierarchy of information. The initial source is description of current request. This description may be include different additional information depending on selected type of mock-up service.\n\nThe operator is one out of these options:\n\n| Operator | Comparison |\n|---|---|\n| `=` | value equals source |\n| `==` | value equals source |\n| `!=` | value is different from source |\n| `<>` | value is different from source |\n| `<>` | value is different from source |\n| `===` | value equals source and is of same type |\n| `eq` | value equals source and is of same type |\n| `!==` | value is different from source or differs from source by type |\n| `neq` | value is different from source or differs from source by type |\n| `ne` | value is different from source or differs from source by type |\n| `<` | value is less than source |\n| `lt` | value is less than source |\n| `<=` | value is less than or equal source |\n| `lte` | value is less than or equal source |\n| `>` | value is greater than source |\n| `gt` | value is greater than source |\n| `>=` | value is greater than or equal source |\n| `gte` | value is greater than or equal source |\n| `~` | value is a regular expression that matches source |\n| `!~` | value is a regular expression that doesn't match source |\n\n:::tip Example\n`path == /some/path` is testing path name of URL in context of an HTTP service. In context of same service `query.arg = 1` tests whether URL query parameter named `arg` has value `1` or not.\n:::\n\nSee the following table for a list of probable sources:\n\n| Name | Description |\n|---|---|\n| `method` | verb of HTTP request selecting request method |\n| `httpVersion` | HTTP version selected by request |\n| `headers.*` | HTTP request headers - Replace `*` with name of header to read. Headers are provided with all letters converted to lowercase variants. |\n| `url` | full request URL consisting of path and query |\n| `path` | leading part of request URL up to first `?` |\n| `query.*` | query parameter extracted from part of request URL following first contained `?` - Replace `*` with name of parameter to read. |\n| `params.*` | parameter extracted from pathname of request URL (in opposition to parameters found in its query) - Works after using convenient path test as described below, only. Replace `*` with name of parameter to read |\n| `body.*` | parameter extracted from transmitted body - Works if body is encoded as JSON and header \"content-type\" is set. Replace `*` with name of parameter to read. |\n\n#### Conveniently Test Path\n\nTests starting with a forward slash are considered to provide a path name pattern to be matched by requests. The provided pattern is passed through [path-to-regexp](https://www.npmjs.com/package/path-to-regexp) to generate a pattern that's eventually used to test an incoming request. See description of supported syntax there.\n\nThe pattern may include parameters to be exposed in `request.params`. This enables use of those parameters when defining interpolated responses.\n\n\n:::tip Example\n`/some/:myname*` is testing path name of URL in context of an HTTP service. Matching path names are `/some`, `/some/sub`, `/some/deep/arbitrary` etc. with exposing part following `/some/` as `params.myname` e.g. for response interpolation.\n:::\n\n#### Combining Tests\n\nMultiple tests may be combined per rule using either keyword `AND` or `OR` between two adjacent test definitions. Using either keyword result in an intersection or union of combined tests. Multiple tests may be combined this way, but only one of the keywords may be used throughout the combination of tests in a single rule.\n\n:::tip Examples\n**Intersection:** `<test-a> AND <test-b>` or `<test-a> AND <test-b> AND <test-c>`\n**Union:** `<test-a> OR <test-b>` or `<test-a> OR <test-b> OR <test-c>`\n:::\n\n### Responses\n\nIn a rule's definition response is separated from preceding tests by `==>`. This arrow must be written literally. Additional meta information on response might be given after that arrow, but _in same line_.\n\nActual response starts after arrow and some optional meta information. Either kind of response may use custom marker for end of response, but currently all supported response types use `EOT` written in a separate line at least.\n\n#### Delaying Responses\n\nResponses may be delayed by intention. A delay is defined by writing number of milliseconds followed by another arrow `==>` right after the arrow marking end of tests as described before.\n\n    <test> ==> 1500 ==> <response>\n\nThis results in response being sent back to client in about 1500ms.\n\n:::warning\nDue to Javascript lacking realtime capabilities either time may be considered estimate value of delay, only.\n:::\n\nBy defining a range using two positive integer values separated by a single dash the actual delay per response is picked randomly from this defined range.\n\n    <test> ==> 1500-5000 ==> <response>\n\nThis results in response being sent back to client with an arbitrary delay between 1500ms and 5000ms.\n\n```\n/just/some/path ==> 5000 ==>\n\tHello path-tester!\nEOT\n```\n\n#### Selecting Type of Response\n\nThe type of response is selected using special type name right after `==>`. In case of declaring a delay this applies to the second `==>`. Following type names are supported:\n\n| Type Name | Resulting Type of Response |\n|---|---|\n| `TEXT` | Simple Text |\n| `MSG` | RFC-2822-Like Message |\n| `MESSAGE` | RFC-2822-Like Message |\n\nWhen omitting this information `TEXT` is used by default.\n\n:::warning Note:\nThis information selects one out of several supported response handlers. It doesn't define the kind of actual response but the way it is defined. Using `TEXT` might be sufficient to sent arbitrary data, but `MSG` is required to be actually able to define response headers. So, sending plain text responses with custom headers still requires use of `MSG` response type.\n:::\n\n#### Simple Text Responses\n\nStarting with line succeeding the one containing `==>` with optionally given meta information and type selector the actual response is provided as regular text. `EOT` must be written in a separate line to mark end of text.\n\nThe text might be indented. Shallowest indentation common to all lines of response is ignored.\n\n```\n/api/:prefix/test ==>\n\tHello {{rule.params.prefix}}-tester!\nEOT\n```\n\n#### RFC-2822-Like Messages\n\nThis type of response doesn't implicitly affect content of resulting response. However it enables support to separately define response headers and response payload in a format similar to RFC-2822. The meaning of _response headers_ strongly depends on actually used service. In context of HTTP service the response headers are actual headers of a RFC-2822-compliant message sent back to client.\n\nStarting with line succeeding the one containing `==>` with optionally given meta information and type selector the actual response is provided. Initial lines of response are defining response headers. Starting after first empty line of response the actual response payload is given. `EOT` must be written in a separate line to mark end of text.\n\nThe response payload might be indented. Shallowest indentation common to all lines of response is ignored. Due to that this response type isn't suitable for sending binary data without proper transfer encoding.\n\n```\n/some/actual/message AND query.type === \"actual\" ==> MSG\n\tset-cookie: mycookie=value:set\n\tx-folded-value: so\n\t\tme\n\t  folded value\n\n\tHello {{query.type}} message-tester!\nEOM\n```\n\n\n### Script Processing\n\nFor every incoming request the whole sequence of rules is processed. Iterating over defined rules top to bottom the first rule in sequence with matching test is picked to provide a response. Any succeeding rules are ignored for the rest of either request.\n","readmeFilename":"README.md"}