{"_id":"vite-plugin-mock-server","_rev":"15-d6d4c92497f12319d575b36c61a32926","name":"vite-plugin-mock-server","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.1":{"name":"vite-plugin-mock-server","version":"1.0.1","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/mumashanren","name":"牧码山人","email":"mumashanren@gmail.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.0.1","maintainers":[{"name":"mumashanren","email":"m2sr@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"c21bce6c4c11d7efa8049af8c88e768ee79a12f0","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.0.1.tgz","fileCount":9,"integrity":"sha512-EFLuFeT7dXBHRcMO0lco85j5ybJqYMlKXi7r5m5pnZv58kwVbO2jiarFhCuxLk3php7NZVJ4kqxkjxZ+lrEZdw==","signatures":[{"sig":"MEYCIQChfVjCmrLpFeX/htc9FXmkWU+aTW52BYRgQqZQQ8McKwIhAKSXLQ2clIgCGLC7O13++a/yKYdHVrTktRFEEDhl9IR3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1tZECRA9TVsSAnZWagAANdQP/jiZzvgsn9mYsYl7uBli\norduSlPmEqp8na7SPIYfHDYkda0oC0DH1V64jpzXawu29tWBuarf0CjKJSaz\nVioZVR5bnsipGqqssIk5CwJsRSVewx8OBahnNFbl1nZv2ee0KZ/mSJMmLCGR\n1ywl4i9ewz0Kvdp/hoj06ams4LSmd1Tyt25nAeN/SPS2hXDaY+5wiSY6JIyI\n1FzvwI2dl94lNBU/ew7TL+qCgO0I1V0hVGN/QB6ZBysF7aePdH9inkwM6BiA\nqTiWC9TgxGaqGB17YD5ghQRE/VhnqX5FaBtEwQTYr+mRY+pPbNsCUHanDpK+\nSE1p+h4d03kOth7IyyiwcL9PXSlTw3FKqPpKTft6i4fB9GY8fq9NIxL4b0vR\ntHRFtK+tZ1QrulUlmwY1H29eZ3S7mq0dMbegb7wX51XEifQuIeTbaOAMyw7f\nZqYnJAI6S0AFDeDGGBVeuw8ZvI7SFMYaXm2QdHYcFyvPU5RDcXkH9ecJ1+st\nlUGZKKdaiTtJQKN/JVYXsZwJo2gAqMKnhIEpLPOZ/9BsTuwtUYN4lv8nwIoo\n3ooFXjZErxz4vGT87nlhQziLlQ06kLEOxfhPCRHAjDd/8qKrm6cey/l+reuP\nnxSeTk+bqlAWEAK5P3yjTgNgqkA1dS5MrhAkGfikJkyZIK2jlFk1zaUAdr3b\ntJCQ\r\n=dLY5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"2adfc29c4a159de6300d32a29e7ba21bc2fa509a","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"mumashanren","email":"m2sr@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"6.14.9","description":"Vite mock server plugin","directories":{},"_nodeVersion":"14.15.3","dependencies":{"chokidar":"^3.5.2","ant-path-matcher":"0.0.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4","@howiefh/ant-path-matcher":"0.0.2"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.0.1_1624692291561_0.10733012717603274","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"vite-plugin-mock-server","version":"1.0.2","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/mumashanren","name":"牧码山人","email":"mumashanren@gmail.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.0.2","maintainers":[{"name":"mumashanren","email":"m2sr@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"56e8551d77eab548d2ed94a1484d270e9823b2b0","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.0.2.tgz","fileCount":9,"integrity":"sha512-ph5ULZUzDwSq8M7Vuo5wJzmMgUMsoOvsQgSuw1zFMDdreZhIncWAQKmSJuqACJHjAzHAVxqQ4yDLZCuuJmvshA==","signatures":[{"sig":"MEUCIASULLCy99gve11Lco6soTihOJyYNMKFYQf3mOBFEQ8iAiEA3aSY+KU9oG3eYw5Huc10AEHcuJxGkXxfCOs4BwAe/sw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1teFCRA9TVsSAnZWagAA/qgQAIv2G02IDl6RkZam6EUV\nM5uz/B7UAWbjjLloz2hLYu0jm1l5GmKXpp5lsEfkrMLJOg4hm3Lj1xgSAxHP\nCt1p0SrLSNxxKetXt1yC3GKU1OBVSQKk8Uvdv2MT6JSljc8QxuyjgiI3LTyV\nbW+UkHcimdBgDz0FrHPvodDV0S3FQL3fCWntb29KCHBJ3+hcaSiHAtzAVRat\nDdXCmfp/MrU/iyZGXbhC2cgmRwyaz4FhEopGKnxGJz+JC5WA9PaBz2o+koSI\nX5jASEqwRyepufhwgTkpQif0I0yd8VVCq86B1eYdLNKRHppMFgznjJJTawCL\n5Mv4RniKLA0kZXPOVdeV4NqsPcnAXvOTqoSmXLJMBt7zOjmAM8PQdC+YGlCR\novVjw3x9ttkXaoH0DabukzSaYr82NgwRBV/HH5AmrUmvcRKviGKKH6gVZtox\nCHhwuEV20naL3pe4TjMxP9yk6NsFV5WjbwmMKvOgsqwPR7eY9N3Pj91RTlBu\n+O0AcxrJgk01q0DlGgCQR0cCx+Hi+TsAYgz50zadYDygcAjARuf66Vbe/Puz\n4GtE97RbunMJ4vnrKDtTuoXEipgOmzffJrlyfth97sBgzTJYWmzp+UEhR1Bj\nzsEp2rKvYYzzHaS1mSJ7kV7HyQwmip667VbrfQMfwj//+8mPMsGNK/PZuDHd\n6j/k\r\n=8Xr7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"41e83df51e21cc8d8c262a1156cbb1af5323dcad","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"mumashanren","email":"m2sr@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"6.14.9","description":"Vite mock server plugin","directories":{},"_nodeVersion":"14.15.3","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.0.2_1624692612595_0.05685117723372901","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"vite-plugin-mock-server","version":"1.0.3","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/mumashanren","name":"牧码山人","email":"mumashanren@gmail.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.0.3","maintainers":[{"name":"mumashanren","email":"m2sr@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"7028b27ac4158759a3fbe697e7403e5ed67507e4","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.0.3.tgz","fileCount":7,"integrity":"sha512-gYjRNm6Q5ehBjaY2guZesEG7HVHSbAFkS4z7cXXKGREnfSjJvD5D0FIzLBoOnHjOeIlz6M1OMtY6v/KqwekOJw==","signatures":[{"sig":"MEYCIQDUE4sxPYftFERCmfHbgPqlzAIdt+cVKr7zz24ffIM25QIhAKkbtjyYJQbRbG7EEeuyMkTIJ+3zKRb+PdG9CNSrYree","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFRmoCRA9TVsSAnZWagAAZBEP/RW5+tCmc9Ec4hpcAhNp\nifqHi5FwIWNuQJKgzfS1PzR/dSGP36PWKstT02+lH0ylxawUAg+iXyQBAkIG\neDp4Czc7+Fo/yphHI2ZatbeTgIAkQgkjyEPUumLVeSCuza/QCbYXn64ki3XH\nF7PGkn70sDndUADNt+Dw8U+0G1IHkaklQiUt1kPGBb1yYcHLeZPLBCQmbsCS\n7RqHtAunGDrEvZEi0StMszX4R2FrcGwR7qQKtljSX/KzjUDQX+q5N3/aK2yz\neyLXhDqRdwPh4GqIW5v9GznKDFHDw7hGBw3JjTLAWEKhiqfQTaLQyBXqSFVR\ndylMvfDV9ys1bLc0HBIyCdmi3zOAYYcthQCAn/4o0UkKma81ahuaoMTxxCk8\n1v/1dBRrvEzv3erimzHfq8iIcwDPKTaA+gmB6m8BVS2KJgD4RSYW3x3a0Pd9\nPeiDmDtOCIa7paotaTYWmcOErasQ1CQ5gplbyhW2Hsd5xtLU40A+GRsgRULa\nytPcC5lV5GJqZXhRG5/MQthk4UvPEhvgY8jjDT0suXF5YjIKMIiTQuWexsTk\napJu+LIe+lQRzyJ08t5IUgzjyTYAeiwuqiNKOA7yWMA5sHnCFl+EL4S8nElk\nBIMzhjmvAlk9d30DJ/l4U3hnVAOoFSG6v9GGhAlB273P7Et/TcLP6yBZ4y9w\nfPW6\r\n=TDKF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"ba14f6a9c0fc6d24fc5469df71faf5bc5cf31ab9","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"mumashanren","email":"m2sr@qq.com"},"deprecated":"Missing dist folder","repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"6.14.5","description":"Vite mock server plugin","directories":{},"_nodeVersion":"12.18.2","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.0.3_1628772775716_0.10262715791186694","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"vite-plugin-mock-server","version":"1.0.4","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/mumashanren","name":"牧码山人","email":"mumashanren@gmail.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.0.4","maintainers":[{"name":"mumashanren","email":"m2sr@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"23624c8bc583a519193b14f47f1447ca1a927d67","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.0.4.tgz","fileCount":10,"integrity":"sha512-ByWLtrBZVo1UkaHPvRpRo0+h/gWorWdTyuYCu2Hcicz3gbuSSdDjz6v8pUGAzpubae90Q7ziOqRL1TOHsbQpsQ==","signatures":[{"sig":"MEUCIQDHlsx4Nkn/lVZ8+l7wa9HtqAPPjj/7t1gojgyZcOMqXgIgMBwclwkncUrwDeGHJcBV1IlBFJcahjYd6QehSU2gcYY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMdKICRA9TVsSAnZWagAADoAP/2eGpeYDYCjWV5xJ/RGn\n58u1h6s1+r2yCWnHPtwNhcAp71WmxG16bEi3bY0Gp54OJFyko8/Wu9i44NfS\n7l5CsJOVYOA5j2o+mu0h6SrQlpugOFvRk9dv7gleElwPr/L9lYSlT2ZSMMtB\nTjbe62KISiEZ7TuW0wxbZhNT+sZ9OzqYMiGxe/zdhNVjLcT7jIDq/qjXPAUn\ni58bKltmmNzdM0OcNWdwQyMLRoWQsIdhO7SA8Q40VKzkJkK5BTbQlQOD0qd9\nE0pcF53bnjPm9g+AI3JKziYxZXu9sfgEM49z9y2pRCzy0mdgTshxABCUPnkU\nxcilES2454Bb+9LjYWXJOstSQxVcXq6tGvoOrpZYNZgjLOsQmJ2oC1tdjj/h\nZ5ISdfx0AHd7zdY+LKHyvwwzrytlnscX/1TDDDJlVrPbcllLxo5lS0uuQLjO\noififj1Ow2jhTns/uuRd9/FWnbA8N8byPsQldWRGS216riZsqLNFLBo48NpM\nhKQW0MUCqEGZGeuIHwILuPXqZ+P2IYLOIwk7skWECsPy7zNNGbdIqrr4iiGd\nZQoA0BsmbuQZYVeYTRQwsES02wHDsdcsVoK2/QBApCun871lLQZtZwppfTtN\nTXu2E2WufIO6A2hUycEc6/Lzy9loehq56o3yBG3zbV3/8euPeEmr+o4kkp0k\n6GBN\r\n=TUHL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","gitHead":"432f2822f16aec5541d2f651bb113c2675d2c629","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"mumashanren","email":"m2sr@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"6.14.9","description":"Vite mock server plugin","directories":{},"_nodeVersion":"14.15.3","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.0.4_1630655111892_0.6199997126532593","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"vite-plugin-mock-server","version":"1.1.0","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/octoape","name":"Octoape","email":"octoape@qq.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.1.0","maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"6dcc8aa400383108ee4fda5a46aacb2c75512be5","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.1.0.tgz","fileCount":10,"integrity":"sha512-jKgLv/qsBeYXJPCEFxNN8R/P1ZkE9uSI4Xerda0qzkKAsHxof2zp3tE8FH+seIHlN2F3C2omDAh9iC53vbp6Jw==","signatures":[{"sig":"MEUCIQD7LDD4oVXdyp38WT/RcGWIF+jJTzUzXbaEvsV3LQr2YQIgCZ/xKHiwuutsVY1m6lg3zMhaqeDrtII0QS1AY7fMqSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34336},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"372c5b204a8702a66c9b2e095ca565337cd10f0e","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"octoape","email":"octoape@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"8.15.0","description":"Vite mock server plugin","directories":{},"_nodeVersion":"16.17.0","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.1.0_1683808670124_0.6390191027690137","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"vite-plugin-mock-server","version":"1.1.1","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/octoape","name":"Octoape","email":"octoape@qq.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.1.1","maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"8b680d9a4bc4afa7530516d60575c008f1a59ca2","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.1.1.tgz","fileCount":9,"integrity":"sha512-CDI5qDFvfTv5CSXyom0W9xFxwX5Q/eKFODDfEA7GPW2zXUR3Odgmw2lbLvEQ9LVq2mRJ8HQRRIdY3iwHHdkS0Q==","signatures":[{"sig":"MEUCIQC7zht73Gbz9LeNMueK8OUStVUYS8V+a5lbTXUE4+oLkgIgHKmlU2Lp2r8m9GJQoEEHgbJEX8KEwLxEvKZOX6zXMKY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33895},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"1e43fa56e22fabf1275470a44511371bcb546894","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"octoape","email":"octoape@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"8.19.4","description":"Vite mock server plugin","directories":{},"_nodeVersion":"16.20.2","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.1.1_1702989828315_0.8515078703030978","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"vite-plugin-mock-server","version":"1.1.2","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/octoape","name":"Octoape","email":"octoape@qq.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.1.2","maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"ca8e7cea66c65fa95f06665c67d0cdb636ad6ed3","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.1.2.tgz","fileCount":9,"integrity":"sha512-h4j2zOGkGE175hDCDaCjZ9gR4GBDSBJ8nDIVZh4/ON4n2ythSr75V7Bn5HkwqlGD+09cTpl9832LVkNu9U+Eog==","signatures":[{"sig":"MEUCIAR5fSCRqmTCYFxiWwL3j/24zTl/fZLYN/4fqmqDz0xQAiEA6mTmKaSJ4phWeWse2qbl7ZhaJ8UNvKUs4bNgj2D9fRw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33915},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"2e1f83089f267368835ddf8ac99cf9a0741fbf89","scripts":{"dev":"tsc -w -p .","build":"rm -rf dist && tsc -p ."},"_npmUser":{"name":"octoape","email":"octoape@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"8.19.4","description":"Vite mock server plugin","directories":{},"_nodeVersion":"16.20.2","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.1.2_1703238217654_0.5980865505653392","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"vite-plugin-mock-server","version":"1.2.0","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/octoape","name":"Octoape","email":"octoape@qq.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.2.0","maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"73050caeba284047865212bff78e0148b27a3110","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.2.0.tgz","fileCount":10,"integrity":"sha512-QEQ0/15P3pXZ5BFzSFxVn3WrsBEfhnP3NOyE6YRfmlRHfWa9zVVK9s+FDIoKUCBkEdYVhNwSFbK6eJQXvjR7vQ==","signatures":[{"sig":"MEQCIBKAvBjZ/ht0GFprGx2RbuoDnPN6MHVvLm3V0qtXJbWlAiAmTiYW03HK7kY1nIqIdsaGm95VCGAnT9QLcFZxfjEH8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36644},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"07b0762826ec29ada2a875ab8050cedb8cce10f7","scripts":{"dev":"tsc -w -p .","build":"del-cli dist && tsc -p ."},"_npmUser":{"name":"octoape","email":"octoape@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"9.6.7","description":"Vite mock server plugin","directories":{},"_nodeVersion":"18.16.0","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","del-cli":"^5.1.0","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.2.0_1709957857189_0.44894898344189516","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"vite-plugin-mock-server","version":"1.3.0","keywords":["vite","mock","hmr"],"author":{"url":"https://github.com/octoape","name":"Octoape","email":"octoape@qq.com"},"license":"MIT","_id":"vite-plugin-mock-server@1.3.0","maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"dist":{"shasum":"e711c34aacaabce2791c403d4491b76653e40c72","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.3.0.tgz","fileCount":9,"integrity":"sha512-CMO/EJj4NT16oU8NRnZvK5vKNLVksIdk6DgnEeBzr8wvm7go7Fk5AOeHtVgoGsMwOueSeeTgNfwjFABpsTEnpQ==","signatures":[{"sig":"MEUCIHaKfgUI/1wt93ih4BpT9yyIxkleeqHvAed/eRlg4qveAiEAmCeRA7zKhcMaUyAuy8t+CGDUiC7cC4nVxsZE2zxZt60=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37001},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"935c1e55dea99363eda231aa2cc73037aef8d19b","scripts":{"dev":"tsc -w -p .","build":"del-cli dist && tsc -p ."},"_npmUser":{"name":"octoape","email":"octoape@qq.com"},"repository":{"url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git","type":"git"},"_npmVersion":"10.5.0","description":"Vite mock server plugin","directories":{},"_nodeVersion":"20.12.2","dependencies":{"chokidar":"^3.5.2","@howiefh/ant-path-matcher":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.3.8","del-cli":"^5.1.0","typescript":"^4.3.4","@types/node":"^15.12.4"},"_npmOperationalInternal":{"tmp":"tmp/vite-plugin-mock-server_1.3.0_1724156851243_0.7054117267984703","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"vite-plugin-mock-server","version":"1.3.1","description":"Vite mock server plugin","main":"dist/index.js","scripts":{"dev":"tsc -w -p .","build":"del-cli dist && tsc -p ."},"repository":{"type":"git","url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git"},"keywords":["vite","mock","hmr"],"author":{"name":"Octoape","email":"octoape@qq.com","url":"https://github.com/octoape"},"type":"module","license":"MIT","bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","devDependencies":{"@types/node":"^15.12.4","del-cli":"^5.1.0","typescript":"^4.3.4","vite":"^2.3.8"},"dependencies":{"@howiefh/ant-path-matcher":"0.0.2","chokidar":"^3.5.2"},"_id":"vite-plugin-mock-server@1.3.1","gitHead":"a50005dc4bc79544bbb2b90d04872519df13d925","types":"./dist/index.d.ts","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-sj6LVSM9CROZVLU3+nMUHFZ9+e/DgeVYt7O9SfR+Slla1zgB5PhXz7234aN0mjNjZFlXcGBbIl9otIPW7375Kw==","shasum":"8ac13dbc6321f00d621ce74337b13214bc0e6689","tarball":"https://registry.npmjs.org/vite-plugin-mock-server/-/vite-plugin-mock-server-1.3.1.tgz","fileCount":9,"unpackedSize":37500,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYWgW+RFBY5PSdues8TN9Jy3/oxmMfQ8a+Lh7Z7OxjtgIhAPr9ol/DIozGXHWVmgeoqjDwtH+VhcUOx0JG2zc3YVJi"}]},"_npmUser":{"name":"octoape","email":"octoape@qq.com"},"directories":{},"maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vite-plugin-mock-server_1.3.1_1724325113534_0.2612832211625631"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-26T07:24:51.561Z","modified":"2024-08-22T11:11:53.875Z","1.0.0":"2021-06-25T03:25:06.265Z","1.0.1":"2021-06-26T07:24:51.671Z","1.0.2":"2021-06-26T07:30:12.754Z","1.0.3":"2021-08-12T12:52:56.078Z","1.0.4":"2021-09-03T07:45:12.036Z","1.1.0":"2023-05-11T12:37:50.346Z","1.1.1":"2023-12-19T12:43:48.495Z","1.1.2":"2023-12-22T09:43:37.836Z","1.2.0":"2024-03-09T04:17:37.489Z","1.3.0":"2024-08-20T12:27:31.433Z","1.3.1":"2024-08-22T11:11:53.700Z"},"bugs":{"url":"https://github.com/enjoycoding/vite-plugin-mock-server/issues"},"author":{"name":"Octoape","email":"octoape@qq.com","url":"https://github.com/octoape"},"license":"MIT","homepage":"https://github.com/enjoycoding/vite-plugin-mock-server#readme","keywords":["vite","mock","hmr"],"repository":{"type":"git","url":"git+https://github.com/enjoycoding/vite-plugin-mock-server.git"},"description":"Vite mock server plugin","maintainers":[{"name":"octoape","email":"octoape@qq.com"}],"readme":"# vite-plugin-mock-server\r\n\r\n[![npm][npm-img]][npm-url]\r\n\r\nProvide local mocks for [Vite].\r\n\r\nA mock server plugin for [Vite], developed based on TypeScript. \r\nAnd support using TypeScript and JavaScript to write Mock API. When the Mock API file \r\nis modified, it will be hot updated automatically. Support and compatibility \r\nwith ***[express.js](https://github.com/expressjs/)*** middlewares.\r\n\r\n## Install\r\n\r\n**node version:** >=12.0.0\r\n\r\n**vite version:** >=2.0.0\r\n\r\n```bash\r\n# if using npm\r\nnpm i vite-plugin-mock-server -D\r\n# if using yarn\r\nyarn add vite-plugin-mock-server -D\r\n```\r\n\r\n### Run example\r\n\r\n```bash\r\ncd ./example\r\nnpm install\r\nnpm run dev\r\n```\r\n\r\n## Usage\r\n\r\n- Config plugin in vite.config.ts, compatible with express.js middlewares.\r\n\r\n```ts\r\nimport { defineConfig } from 'vite'\r\nimport vue from '@vitejs/plugin-vue'\r\nimport bodyParser from 'body-parser'\r\nimport cookieParser from 'cookie-parser'\r\nimport mockServer from 'vite-plugin-mock-server'\r\n\r\nexport default defineConfig({\r\n  plugins: [\r\n    vue(),\r\n    mockServer({\r\n      logLevel: 'info',\r\n      middlewares: [\r\n        cookieParser(),\r\n        bodyParser.json(),\r\n        bodyParser.urlencoded(),\r\n        bodyParser.text(),\r\n        bodyParser.raw()\r\n      ]\r\n    })\r\n  ]\r\n})\r\n```\r\n\r\n- Or just use it with the default parameters, place your mocks in the folder \"mock\" with name that prefix *.mock.ts or *mock.js, The default api to mock is '/api/'\r\n```ts\r\nimport { defineConfig } from 'vite'\r\nimport vue from '@vitejs/plugin-vue'\r\nimport mockServer from 'vite-plugin-mock-server'\r\n\r\nexport default defineConfig({\r\n  plugins: [\r\n    vue(),\r\n    mockServer())\r\n  ]\r\n})\r\n```\r\n\r\n## Module exports\r\n\r\n- MockOptions\r\n\r\n`mockModules` Ignore manual configuration, it will be filled in automatically.\r\n\r\n```ts\r\nexport type MockOptions = {\r\n  logLevel?: 'info' | 'error' | 'off'\r\n  urlPrefixes?: string[]\r\n  mockJsSuffix?: string\r\n  mockTsSuffix?: string\r\n  mockRootDir?: string\r\n  mockModules?: string[]\r\n  noHandlerResponse404?: boolean\r\n  middlewares?: MockLayer[]\r\n  printStartupLog?: boolean\r\n}\r\n\r\n// default options\r\nconst options: MockOptions = {\r\n  logLevel: 'info',\r\n  urlPrefixes: [ '/api/' ],\r\n  mockRootDir: './mock',\r\n  mockJsSuffix: '.mock.js',\r\n  mockTsSuffix: '.mock.ts',\r\n  noHandlerResponse404: true,\r\n  mockModules: [],\r\n  middlewares: [],\r\n  printStartupLog: true\r\n}\r\n```\r\n\r\n- Request\r\n  \r\n```ts\r\ntype Request = Connect.IncomingMessage & { \r\n  body?: any, \r\n  params?: { [key: string]: string }, \r\n  query?: { [key: string]: string },\r\n  cookies?: { [key: string]: string },\r\n  session?: any\r\n}\r\n```\r\n\r\n- MockFunction\r\n  \r\n```ts\r\nexport type MockFunction = {\r\n  (\r\n    req: Request, \r\n    res: http.ServerResponse, \r\n    /** @deprecated in 2.0, use req.params **/\r\n    urlVars?: { [key: string]: string }\r\n  ): void\r\n}\r\n```\r\n\r\n- MockHandler\r\n\r\n```ts\r\nexport type MockHandler = {\r\n  pattern: string,\r\n  method?: string,\r\n  handle: MockFunction\r\n}\r\n```\r\n\r\n- MockLayer\r\n\r\n```ts\r\nexport type MockLayer = (\r\n    req: Request,\r\n    res: http.ServerResponse,\r\n    next: Connect.NextFunction\r\n) => void;\r\n```\r\n\r\n## Mock file examples\r\n\r\nThe `pattern` is an ant-style path pattern string, \r\nuse ***[@howiefh/ant-path-matcher](https://www.npmjs.com/package/@howiefh/ant-path-matcher)*** \r\nto match the `pattern` and `request URL`.\r\n\r\n```ts\r\n// example/mock/es.mock.ts\r\n\r\nimport { MockHandler } from '../../src'\r\n\r\nconst mocks: MockHandler[] = [\r\n  {\r\n    pattern: '/api/test1/1',\r\n    handle: (req, res) => {\r\n      res.end('Hello world!' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/test1/*',\r\n    handle: (req, res) => {\r\n      res.end('Hello world!' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/test1/users/{userId}',\r\n    handle: (req, res) => {\r\n      const data = {\r\n        url: req.url,\r\n        params: req.params,\r\n        query: req.query,\r\n        body: req.body\r\n      }\r\n      res.setHeader('Content-Type', 'application/json')\r\n      res.end(JSON.stringify(data))\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/test1/body/json',\r\n    method: 'POST',\r\n    handle: (req, res) => {\r\n      res.setHeader('Content-Type', 'application/json')\r\n\r\n      //req is incomingMessage which extends stream.Readable \r\n      // --> https://nodejs.org/api/stream.html#readablereadsize\r\n      // res.end need to be within the function\r\n      // there is a size limit for the bodyString to get parsed \r\n      req.on('data', (bodyString: string) => { \r\n        let body: object = JSON.parse(bodyString)\r\n        res.end(JSON.stringify(body))\r\n      })\r\n    }\r\n  },\r\n]\r\n\r\nexport default mocks\r\n\r\n// example/mock/apis/es2.mock.ts\r\n\r\nimport { MockHandler } from 'vite-plugin-mock-server'\r\n\r\nexport default (): MockHandler[] => [\r\n  {\r\n    pattern: '/api/test2/1',\r\n    handle: (req, res) => {\r\n      res.end('Hello world!' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/test2/2',\r\n    handle: (req, res) => {\r\n      res.statusCode = 203\r\n      res.end('Hello world!' + req.url)\r\n    }\r\n  }\r\n]\r\n```\r\n\r\n```js\r\n// example/mock/cjs.mock.js\r\n\r\nmodule.exports = [\r\n  {\r\n    pattern: '/api/merchant1',\r\n    method: 'GET',\r\n    handle: (req, res) => {\r\n      res.end('merchant1:' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/merchant2',\r\n    method: 'GET',\r\n    handle: (req, res) => {\r\n      res.end('merchant2:' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/merchant2',\r\n    method: 'GET',\r\n    handle: (req, res) => {\r\n      res.end('merchant3:' + req.url)\r\n    }\r\n  }\r\n]\r\n\r\n// example/mock/apis/cjs2.mock.js\r\n\r\nmodule.exports = [\r\n  {\r\n    pattern: '/api/hello1',\r\n    method: 'GET',\r\n    handle: (req, res) => {\r\n      res.end('hello1:' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/hello2',\r\n    method: 'GET',\r\n    handle: (req, res) => {\r\n      res.end('hello2:' + req.url)\r\n    }\r\n  },\r\n  {\r\n    pattern: '/api/hello3',\r\n    method: 'GET',\r\n    handle: (req, res) => {\r\n      res.end('hello2:' + req.url)\r\n    }\r\n  }\r\n]\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n\r\n[npm-img]: https://img.shields.io/npm/v/vite-plugin-mock-server.svg\r\n[npm-url]: https://npmjs.com/package/vite-plugin-mock-server\r\n[Vite]: https://vitejs.dev","readmeFilename":"README.md"}