{"_id":"bun-bagel","_rev":"10-6f262b241a45e095c30327f548ecba22","name":"bun-bagel","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"bun-bagel","version":"1.0.0","_id":"bun-bagel@1.0.0","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"dist":{"shasum":"c07e852174ba5ef9c76c44590df62f9ff5998b28","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.0.tgz","fileCount":4,"integrity":"sha512-qD77Wioau2T9k5LgftOwsMOVgwUkNvs68wntTVFDeQWf+wvZBsXczyQPb0G/CEikOsy4PInq6aQ8xlR4SQ4HRA==","signatures":[{"sig":"MEQCIFsa/3ir4Rz/3jRqj5YH3vfVuVv9dh+1zP11P0/Uk5SEAiBRTlOCeq8cIhpKV+ZhWyECpcfJEt9oEsqWHPsXJxAHUg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2517},"type":"module","module":"src/index.ts","gitHead":"daa8cf75342edeb8ab1d3e9a8f24ec165ac75680","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun build src/index.ts --outdir ./dist --target bun --splitting --minify --sourcemap=inline"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"_npmVersion":"10.7.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"22.1.0","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.0_1716745036826_0.32556543816153893","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"bun-bagel","version":"1.0.1","_id":"bun-bagel@1.0.1","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"dist":{"shasum":"71a7d4aee4adaaaeb5a3128b372d4b9d4d0063e8","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.1.tgz","fileCount":4,"integrity":"sha512-1+2RCFFTkN/o+IFI7cXOwBpYvXk9NPu9hAaxm6EPcZAOdf5v0Gdcu5Xi4nO1Fw0pb/zlQ1b3Y69TzJQX5/I+0g==","signatures":[{"sig":"MEUCIEXlRAiEtD4qkVxk+VtKHORiVyKesNdXh5hfTnp80nv+AiEA5VyP59EmMdtCPXVIX7NgKheweRHIoeMi+JDB2ZvZCIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2775},"main":"dist/index.js","type":"module","module":"src/index.ts","gitHead":"cd34e81924d88950777964d6f0f7b983f12ef8e6","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","build:bun":"bun build ./src/index.ts --outdir dist --target bun --splitting --minify --sourcemap=inline","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"_npmVersion":"10.7.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"22.1.0","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.1_1716745614653_0.9342713481371281","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"bun-bagel","version":"1.0.3","license":"MIT","_id":"bun-bagel@1.0.3","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"dist":{"shasum":"f0a0ab37113547dc05c050b97838e0b03ce79b66","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.3.tgz","fileCount":7,"integrity":"sha512-Tzu1/e09XEArNX8XSCfCzv4tjPvYbOeQLNB6NWUUegyLJ7PF+jje6dU/bwM0RC4nO4zGQl6/1LsDnLt+N4GLTg==","signatures":[{"sig":"MEUCIHXUHf463HviFAHJmVDvgYDU59S16O7qXXPrxagBLYgWAiEAmU3pEUUl2YsILtNnaPdhrCnVVFOSFHCixe5LDss6K2o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38345},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"272dd72262e53027e4d1914cbf600e0eba4dff29","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","build:bun":"bun build ./src/index.ts --outdir dist --target bun --splitting --minify --sourcemap=inline","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"_npmVersion":"10.5.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.2","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.3_1716746189958_0.08907618125854411","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"bun-bagel","version":"1.0.4","author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","_id":"bun-bagel@1.0.4","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"dist":{"shasum":"0846177b748c7fc9c9a5ee806763b497be24fc0a","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.4.tgz","fileCount":9,"integrity":"sha512-3/gv1wzkcSWmIcJb+QcCzC1KLZSNfGMWhD8LhaDKvK7dfWweYkpoij3k37HeJkmPpVEFWwE0DCjeukyTzy9uYQ==","signatures":[{"sig":"MEUCIA7euNU5BXuW5xvRqughu87DSJoyQx2TQrRIkQ5LzkK4AiEAoVVOTZpkJA3xLHGZ6OJdG0mvZxLQgff1RyMzzl4xBPs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40686},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"623c85c3dc618b01d6e1765409148503719aed88","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","build:bun":"bun build ./src/index.ts --outdir dist --target bun --splitting --minify --sourcemap=inline","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"repository":{"url":"git+https://github.com/DRFR0ST/bun-bagel.git","type":"git"},"_npmVersion":"10.5.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.2","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.4_1716748513839_0.8905631160423235","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"bun-bagel","version":"1.0.5","author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","_id":"bun-bagel@1.0.5","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"dist":{"shasum":"a64b47f663fc39b90a1bc8a97e9194c6764f00d9","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.5.tgz","fileCount":9,"integrity":"sha512-ryQHsBuTsIt6EAEr4Ox3XguR0DkGgjSIL/kSPS3rmIki3i4q7jrry+1hWA+/mnJPEpG9yNbp3DuF+VEovYfT1Q==","signatures":[{"sig":"MEUCIQCQKBF36y6kuSilRty/xAx/mvWOiXIV34BGA7cHYkwoLQIgDHw4RV3VepN1ep6bvm2RA5oeuZ2eMFarkuAgMuTlfXY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40707},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"e4c6dba21b762207bdf77ee46b0cff4b06d93a3a","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","build:bun":"bun build ./src/index.ts --outdir dist --target bun --splitting --minify --sourcemap=inline","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"repository":{"url":"git+https://github.com/DRFR0ST/bun-bagel.git","type":"git"},"_npmVersion":"10.5.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.2","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.5_1716748788102_0.2987893535731261","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"bun-bagel","version":"1.0.6","author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","_id":"bun-bagel@1.0.6","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"dist":{"shasum":"8b5ea22fb67b9c767621cfca2f72699b205d0d09","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.6.tgz","fileCount":9,"integrity":"sha512-H/qPmXUtyRROW4Ob1jOgfYqRUg7ds7AinH75f2SPRQpywRks2bxpeTL1PBTNnWUlb3U3+RKGdLiqyX7ex+8s0A==","signatures":[{"sig":"MEYCIQCYYWDen4g7gX1swttDxPYZmoIU5/39CB2zpRYAfIrMyAIhAMBshZhhzyBTH2tAUfie6B+ZDlr/LbNWYQaH04kyaoqB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44050},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"9751e1d59143ba7d1f9392a4bb53f2992751fb5e","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","build:bun":"bun build ./src/index.ts --outdir dist --target bun --splitting --minify --sourcemap=inline","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"repository":{"url":"git+https://github.com/DRFR0ST/bun-bagel.git","type":"git"},"_npmVersion":"10.5.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.2","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.6_1716753755384_0.45256654078593783","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"bun-bagel","version":"1.0.8","keywords":["bun","bun-bagel","fetch","mock","mocking","testing","unit-testing"],"author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","_id":"bun-bagel@1.0.8","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"dist":{"shasum":"14c783a68357763a2dee7b35c090c9f20132cc40","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.8.tgz","fileCount":12,"integrity":"sha512-eAUHRMZ9Hh9fr0pusbPlAQm7NTrGLHHmkF8s6d9JtQUD0yLxH0f37h1RgbrpKK2Hzs3vvywq3itVZhWjmoZofw==","signatures":[{"sig":"MEQCIBsf+0TZMrHpNVDHcUNrkcvuh70VJpxSPWurDKrSYrwBAiA0OiFAhcJQ5EuumU4lHE0/0rYz1DUNPodTX5HL546K6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46780},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"6a60ed95d0add68d4f5ffe5d229902263ac4a5e5","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","sandbox":"bun run ./sandbox/index.ts","build:bun":"bun build ./src/index.ts --outdir dist --target bun --minify --sourcemap=external","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"repository":{"url":"git+https://github.com/DRFR0ST/bun-bagel.git","type":"git"},"_npmVersion":"10.5.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.2","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.8_1716761691762_0.2235061427755054","host":"s3://npm-registry-packages"}},"1.0.9":{"name":"bun-bagel","version":"1.0.9","keywords":["bun","bun-bagel","fetch","mock","mocking","testing","unit-testing"],"author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","_id":"bun-bagel@1.0.9","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"dist":{"shasum":"ba06e5f89d83d4b1467f26df2d4bc16009dd640e","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.0.9.tgz","fileCount":12,"integrity":"sha512-MWFiglRRAQtc6PUbtH48oG4fhMEmRuF9dwP8IQ9f6jSG5SYtb9a9tw7qULhUyTlOfZ0fDqpliqhjywrBDw914g==","signatures":[{"sig":"MEUCIBnuc9lkE57N5IfrE50+V/9aXSuf0PNpqaSZ/A2M+K63AiEAiZLbfNvcIE1H+bf87cKgiXmoRiT4njg0XfXAra1xTno=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46869},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"9a1b53665ddd11806d78956a0a6fcd7e46ee7758","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","sandbox":"bun run ./sandbox/index.ts","build:bun":"bun build ./src/index.ts --outdir dist --target bun --minify --sourcemap=external","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"repository":{"url":"git+https://github.com/DRFR0ST/bun-bagel.git","type":"git"},"_npmVersion":"10.7.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.4","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.0.9_1721728606584_0.6976399026672939","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"bun-bagel","version":"1.1.0","keywords":["bun","bun-bagel","fetch","mock","mocking","testing","unit-testing"],"author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","_id":"bun-bagel@1.1.0","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"dist":{"shasum":"00825334b54c0dede430dbbe0e37c7314b9c79c3","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.1.0.tgz","fileCount":12,"integrity":"sha512-XfBxWAf4jrGrN9xLvZMIsWHfXMLTu4GeZ+fyroVvfSOTj9qsB7tejMX6NMES5rvJMQXs0ksgU3eOF2La0sl4hQ==","signatures":[{"sig":"MEQCIGiT4ADbej8tXdK5ChFjjMnXuplN/GFARtvUQc4TZlWpAiADj51MJPlUeS6X/0l+Faf0U6tGfq6kRJADmF7Yc4S17Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49119},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"src/index.ts","gitHead":"4810abee7fb36a4d5395b7da9c48be7804dce580","scripts":{"dev":"bun run src/index.ts","test":"bun test --coverage","build":"bun run build:bun && bun run build:emitDeclarations","sandbox":"bun run ./sandbox/index.ts","build:bun":"bun build ./src/index.ts --outdir dist --target bun --minify --sourcemap=external","prepublish":"bun run build","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.json --tsBuildInfoFile './dist/.tsbuildinfo'"},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"repository":{"url":"git+https://github.com/DRFR0ST/bun-bagel.git","type":"git"},"_npmVersion":"10.7.0","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","directories":{},"_nodeVersion":"18.20.4","_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-bagel_1.1.0_1726997895638_0.37835460559155587","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"bun-bagel","description":"🥯 The Bun fetch mocker with a hole lot of flavor.","version":"1.2.0","module":"src/index.ts","main":"dist/index.js","types":"dist/index.d.ts","type":"module","license":"MIT","author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/DRFR0ST/bun-bagel.git"},"scripts":{"dev":"bun run src/index.ts","build":"bun run build:bun && bun run build:emitDeclarations","build:bun":"bun build ./src/index.ts --outdir dist --target bun --minify --sourcemap=external","build:emitDeclarations":"tsc --emitDeclarationOnly --project tsconfig.build.json --tsBuildInfoFile './dist/.tsbuildinfo'","sandbox":"bun run ./sandbox/index.ts","test":"bun test --coverage","lint":"bunx biome lint --write ./src ./tests","format":"bunx biome format --write ./src ./tests","check":"bunx biome check --write ./src ./tests","check:fix":"bunx biome check --unsafe --fix ./src ./tests","prepublish":"bun run build"},"devDependencies":{"@biomejs/biome":"1.9.2","@types/bun":"^1.2.4","bun-types":"latest"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["bun","bun-bagel","fetch","mock","mocking","testing","unit-testing"],"_id":"bun-bagel@1.2.0","gitHead":"b7a2b9c209481173fc95da34967732672e4e895c","bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"homepage":"https://github.com/DRFR0ST/bun-bagel#readme","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-c4S68dNddpnog9nxXp9PAhcep0alOy49jpRlC1yACoxplUvgX22NZxeQUIIov5TCJJDH/snT5R9bMyix7AG0KQ==","shasum":"afc5d74a232f2b572715497526e6f37b2a72498d","tarball":"https://registry.npmjs.org/bun-bagel/-/bun-bagel-1.2.0.tgz","fileCount":12,"unpackedSize":57217,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCKWsz5KzXvgctTeDj//6SiBxtBUcgR8I9t4LZ7l2OsAAIhAJqezObiLXockByqZI4pVDcRiQfsFaeaxw1dIIr+hfBB"}]},"_npmUser":{"name":"drfrost","email":"mike.eling97@gmail.com"},"directories":{},"maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bun-bagel_1.2.0_1741471710268_0.45309664632416746"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-26T17:37:16.826Z","modified":"2025-03-08T22:08:30.621Z","1.0.0":"2024-05-26T17:37:16.997Z","1.0.1":"2024-05-26T17:46:54.789Z","1.0.3":"2024-05-26T17:56:30.154Z","1.0.4":"2024-05-26T18:35:14.001Z","1.0.5":"2024-05-26T18:39:48.299Z","1.0.6":"2024-05-26T20:02:35.523Z","1.0.8":"2024-05-26T22:14:51.908Z","1.0.9":"2024-07-23T09:56:46.723Z","1.1.0":"2024-09-22T09:38:15.827Z","1.2.0":"2025-03-08T22:08:30.462Z"},"bugs":{"url":"https://github.com/DRFR0ST/bun-bagel/issues"},"author":{"name":"Mike Eling","email":"mike.eling97@gmail.com"},"license":"MIT","homepage":"https://github.com/DRFR0ST/bun-bagel#readme","keywords":["bun","bun-bagel","fetch","mock","mocking","testing","unit-testing"],"repository":{"type":"git","url":"git+https://github.com/DRFR0ST/bun-bagel.git"},"description":"🥯 The Bun fetch mocker with a hole lot of flavor.","maintainers":[{"name":"drfrost","email":"mike.eling97@gmail.com"}],"readme":"# 🥯 bun-bagel: The Bun fetch mocker with a hole lot of flavor.\n\n[![npm version](https://badge.fury.io/js/bun-bagel.svg)](https://www.npmjs.com/package/bun-bagel)\n[![GitHub license](https://img.shields.io/github/license/DRFR0ST/bun-bagel)](https://github.com/DRFR0ST/bun-bagel/blob/main/LICENSE)\n[![🧪 Tests](https://github.com/DRFR0ST/bun-bagel/actions/workflows/test.yml/badge.svg)](https://github.com/DRFR0ST/bun-bagel/actions/workflows/test.yml)\n\n---\n\n**bun-bagel** is a mocking library specifically designed for [Bun's fetch](https://bun.sh/guides/http/fetch) API. It enables developers to easily intercept fetch requests and provide custom mock responses, streamlining the development and testing process of Bun applications.\n\n:warning: The library is yet only experimental and might change over time. \n\n## 📖 Usage\n\n```ts\nimport { mock } from \"bun-bagel\";\n\n// Register the mock for the example URL.\nmock(\"https://example.com/api/users/*\", { data: { name: \"Foo\" } });\n\n// Make a fetch request to the mocked URL\nconst response = await fetch(\"https://example.com/api/users/123\");\n\n// Print the response body\nconsole.log(await response.json());\n```\n\n#### Output:\n\n```\n{ name: \"Foo\" }\n```\n\n## 🚀 Why bun-bagel?\n\n- **Lightweight and easy to use**: Get started in minutes with a simple, intuitive API.\n- **Flexible and powerful**: Handle a wide range of mocking scenarios with ease.\n- **Built for Bun**: Seamlessly integrates with Bun's runtime for a smooth developer experience.\n- **Thoroughly tested**: Comes with a comprehensive test suite to ensure reliability.\n\n## 📚 Installation\n\n`bun install bun-bagel`\n\n## 🧪 Examples\n\n### Bun Unit Tests\n```ts\nimport { describe, test, expect, afterEach } from \"bun:test\";\nimport { mock, clearMocks } from \"bun-bagel\";\n\ndescribe(\"Unit Test\", () => {\n\n    afterEach(() => {\n        clearMocks();\n    });\n\n    test(\"Mock Fetch\", async () => {\n        // Register the mock for the example URL.\n        mock(\"https://example.com/api/users/*\", { data: { name: \"Foo\" } });\n\n        // Call a function that uses the fetch method.\n        const response = await fetchSomeData();\n\n        // Print the response body\n        console.log(await response.json()); // => { name: \"Foo\" }\n    });\n});\n```\n\n### Bun Unit Tests with Bun.file\n```ts\nimport { describe, test, expect, afterEach } from \"bun:test\";\nimport { mock, clearMocks } from \"bun-bagel\";\n\ndescribe(\"Unit Test\", () => {\n    \n    test(\"Mock Fetch\", async () => {\n        // Register the mock for the example URL.\n        mock(\"https://example.com/api/users/*\", { data: Bun.file(\"./my-file.json\") });\n\n        // Call a function that uses the fetch method.\n        const response = await fetchSomeData();\n        const blob = await response.blob();\n\n        // Print the body\n        console.log(await blob.json()); // => { name: \"Bar\" }\n    });\n});\n```\n\n### Mock by headers and method\n```ts\nimport { mock } from \"bun-bagel\";\nimport type { MockOptions } from \"bun-bagel\";\n\nconst options: MockOptions = {\n    method: \"POST\",\n    headers: new Headers({ \"x-foo-bar\": \"baz\" }),\n    response: {\n        data: { name: \"Foo\" },\n    }\n};\n\n// Register the mock for the example URL.\nmock(\"https://example.com/api/users/*\", options);\n\n// Make a fetch request to the mocked URL\nconst response = await fetch(\"https://example.com/api/users/123\", { headers: new Headers({ \"x-foo-bar\": \"baz\" }) });\n\n// Requests without the headers will not be matched.\nconst response2 = await fetch(\"https://example.com/api/users/123\");\n\n// Check the response body.\nconsole.log(await response.json()); // => { name: \"Foo\" }\n```\n\n### Mock response status and headers\n```ts\nimport { mock } from \"bun-bagel\";\nimport type { MockOptions } from \"bun-bagel\";\n\nconst options: MockOptions = {\n    response: {\n        data: { name: \"Foo\" },\n        status: 404,\n        headers: new Headers({ \"x-foo-bar\": \"baz\" }),\n    }\n};\n\n// Register the mock for the example URL.\nmock(\"https://example.com/api/users/*\", options);\n\n// Make a fetch request to the mocked URL\nconst response = await fetch(\"https://example.com/api/users/123\");\n\n// Check the status and headers.\nconsole.log(response.status); // => 404\nconsole.log(response.headers); // => { \"x-foo-bar\": \"baz\" }\n```\n\n### Disable real http requests\n\n```\nimport { disableRealRequests } from \"bun-bagel\";\n\ndisableRealRequests();\n\nawait fetch(\"https://example.com/api/users/123\"); // Throws 404 error.\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for details.\n\n## 🔨 Development\n\nTo contribute to bun-bagel, follow these steps:\n\n1. Clone the repository: `git clone https://github.com/DRFR0ST/bun-bagel.git`\n2. Install dependencies: `bun install`\n3. Run tests: `bun test`\n4. Run linter & formatter: `bun run check`\n5. Build the library: `bun run build`\n\n> [!NOTE]\n>You can also play around with bun-bagel by making changes in the `/sandbox` directory and running `bun run sandbox`. Make sure to build the library after making changes in the `/src` directory.\n\n## 🤝 Community\n\nJoin the discussion on the [GitHub Discussions](https://github.com/DRFR0ST/bun-bagel/discussions) page.\n\n## 📝 License\nThis project is licensed under the terms of the MIT license. See the [LICENSE](https://github.com/DRFR0ST/bun-bagel/blob/main/LICENSE) file for details.\n\n#### 📢 Thanks to all contributors for making this library better!\n#### 🤖 Thanks to Gemini for generating a part of the initial code and readme, and helped brainstorm the idea.","readmeFilename":"README.md"}