{"_id":"@cjkihl/bun-cors","_rev":"11-f23937d32fc05cfe8d27e402aabd8da1","name":"@cjkihl/bun-cors","dist-tags":{"latest":"2.0.9"},"versions":{"0.0.1":{"name":"@cjkihl/bun-cors","version":"0.0.1","author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@0.0.1","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"dist":{"shasum":"62689a0bdf3b0986073e7dce080a508ca3d97926","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-0.0.1.tgz","fileCount":4,"integrity":"sha512-64uQSZU/02XUNW28v7QjuQZdymNP5nTxhxdFq2bmpEbtEMXnEim/WTt+Z31BiyvyOmvPZ9PN1ed2SlPdhCkNOw==","signatures":[{"sig":"MEUCIQD3vfMfGa7qjTVJmIb3mpg3LPT5XsLV9cIlOfmLMv/bWAIgH+bitnbFK7bUsdeS8BqleTCjPpMw8h+mAPaQSkSUScg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3765},"type":"module","exports":{".":{"types":"./.dist/types/index.d.ts","default":"./.dist/output/index.js"}},"gitHead":"e376870e11c74c28ad1cd65265c629132049fa23","scripts":{"ts":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"_npmVersion":"10.9.0","description":"Cors middleware for bun","directories":{},"_nodeVersion":"23.3.0","dependencies":{"@cj/config":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bun-cors_0.0.1_1739700737544_0.9246313610910084","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@cjkihl/bun-cors","version":"2.0.0","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.0","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"0fac01890ea5866dc4cda2a015e6a68bd0ed2a05","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.0.tgz","fileCount":2,"integrity":"sha512-nPLqquD1MEdrt+PncgHLQ+9Uh3fJO0IFrxCSJ76pvmNtmCQM/hdNtoOtaDhdUNrG54rGqu4qSKnUQa6ze9O5qA==","signatures":[{"sig":"MEUCIQDVjGd+ID26b089hXND9XXzELmWJEjD18V7+WX2wk+AKQIgT0mpSCyqUKoYWdcXaGjnDeh+EZp0wtUXHpJpQDkoUHw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5915},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"a6ad9dba8352bbe6dd43f3a2b39d761ede1642a3","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts"},"_npmUser":{"name":"caki0915","actor":{"name":"caki0915","type":"user","email":"carljohan.kihl@gmail.com"},"email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"bun":"latest","@types/bun":"latest"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.0_1750320014854_0.76289749811011","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@cjkihl/bun-cors","version":"2.0.1","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.1","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"c3d85e1b27bf779faa039e2d66b6d703f9617673","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.1.tgz","fileCount":11,"integrity":"sha512-G3Fh3+p7VSQUYNZOQ00NIYjZ3CORchYAMSPDtuY4QyNNIvzb6eJVEQ7LyVaV2zllncJ7CshJCGfp2KqNiuOFMA==","signatures":[{"sig":"MEYCIQDaDhuw53X9j9C5nbrQEDv/lhKDNJm/xAc8iTsTB8fvMAIhAOoCz1pVHygaoInrElHV7ap+PbKz/LEeB5JmA876pm2D","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51299},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"22089a4f2e1b6876a283c93926f667a3fdad57f8","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts"},"_npmUser":{"name":"caki0915","actor":{"name":"caki0915","type":"user","email":"carljohan.kihl@gmail.com"},"email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"bun":"latest","@types/bun":"latest"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.1_1750387325242_0.10057452314219639","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@cjkihl/bun-cors","version":"2.0.2","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.2","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"b0034d236b19a254fce71347642a9512f1e14d58","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.2.tgz","fileCount":11,"integrity":"sha512-CObxwzJ4wiiBGYBPOhhmig3rn/AZGhMxwLle0loDeJlkIy3jyXzxAHAJVPAzC1kalMds4PzRIZyDGq0F+tfcbQ==","signatures":[{"sig":"MEYCIQCceTaRd4nwxE0+9RxEocuyYO8gxN4I0nykazd1b9pnyAIhAO/oUTNCJ+6t3qL6avosWus9E0tv8pFBP8jPM+NVfSHR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51333},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"8981fc1c944b1fc4fc27ca0ec6c0f8e57f82ef33","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts","type-check":"tsc --noEmit"},"_npmUser":{"name":"caki0915","actor":{"name":"caki0915","type":"user","email":"carljohan.kihl@gmail.com"},"email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"bun":"latest","@types/bun":"latest"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.2_1750906231609_0.8339490436112222","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@cjkihl/bun-cors","version":"2.0.3","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.3","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"08d4e6bd1c7b5099ddd818021eef0579df325132","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.3.tgz","fileCount":11,"integrity":"sha512-Z/Y8vTcYMvBb6UTHjmjV4l2nPJH24dCcFAkum73rZwZ0ItqXTYt7GJUVYju03b0QjgDufotjnguMycfvzeT9jQ==","signatures":[{"sig":"MEQCIFdavO0nJ0cgJ05MNjNWWd5j5u01g77KatMNsLJBg2HhAiA4DuafsCaGMBRK+5wW4Lx55g9M7hUbuW/nzhX2AfOykw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52298},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"fdcc76fe342906b61da8fa1afe776b8ea4c41db4","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts","type-check":"tsc --noEmit"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"bun":"^1.0.0","@types/bun":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.3_1757664534388_0.9420815126407531","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@cjkihl/bun-cors","version":"2.0.4","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.4","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"47f79e19373062a232878a4a13f3c79a87ba418f","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.4.tgz","fileCount":11,"integrity":"sha512-FKz1+iUXBUfVTPBszfrjaZe65//XRlGzac//gnz+A5WzMHM38qv1PFdkIGiPfVlHep1qkg35ykEMu6NG4HArNQ==","signatures":[{"sig":"MEQCIBxNuqZjLbQDh3ZOI1R1hQAOmtnM6fgpnqhFJBRfp+9SAiAMRtUOwJCH5EM2dfO6jf35Py+bwTTbx4eEkelVrWNlEA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54994},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"05e7f6e5ebac8c7e7a590da7d8da90307ec2448d","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts","type-check":"tsc --noEmit"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.2.23"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.4_1759657005164_0.27979934804993967","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"@cjkihl/bun-cors","version":"2.0.5","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.5","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"a96a79e4a17f789b20f640bc8d90b75d85bf5b77","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.5.tgz","fileCount":11,"integrity":"sha512-rdreA50jZRhN+0YLqyV5rXSnxRJzoVwID9AGqzcTR2xvsFxsIuWshLzSVU9rIjebwdxxcGRHozQw3o+qs7h+2Q==","signatures":[{"sig":"MEYCIQC9K1c2bcvOA/2uqAgC49egFuwh00jg5tePHbjkH3PZPQIhAOxlym7pK2BCftcUj01QYK1EZYpoYL7XyF0O3QUdlAoT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55116},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"e58165e17ab746244a327fe88ee0f246cb600d03","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts","type-check":"tsc --noEmit"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.2.23"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.5_1759727540375_0.9680264542456489","host":"s3://npm-registry-packages-npm-production"}},"2.0.6":{"name":"@cjkihl/bun-cors","version":"2.0.6","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.6","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"5076e9ad9799e4e0976b3444f2e3663f4c473205","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.6.tgz","fileCount":11,"integrity":"sha512-X/r7oaq1hLVdSqfs62nTWQySBNV2ntdw17GuUdBMt3DT63agPU2jbhWpMLrO/7GpVIFy2pQ2P+sk96n94V614Q==","signatures":[{"sig":"MEQCIFiejo7IX/Wu9hXHCtu841LMuhfXtPstNBwmRmWKuoF+AiACTnBGAy8E4zuR7AkIuYsEBv2QSPp6OA6xICXeu05LnQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66306},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"ad7f37cd403448c435de83a8201a65b1db53a7e0","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts","type-check":"tsc --noEmit"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.0","@types/node":"^24.7.2"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.6_1760588550795_0.08494844054360184","host":"s3://npm-registry-packages-npm-production"}},"2.0.7":{"name":"@cjkihl/bun-cors","version":"2.0.7","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.7","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"079b2e7b4e333b85aac64b97b6af517147b93b6d","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.7.tgz","fileCount":11,"integrity":"sha512-uN8NevqIABSx+KGY/rCH3pXZJ2fgDrIm29lnSkJaOxSLlsl9t7WUjg3W3lBulVmk/sQLaIBasRXkx+CzJlr1gQ==","signatures":[{"sig":"MEYCIQCLQSNVC8jaZhsuk8G4g3pzJkhXnVHfXy6BGNHBDS3HGgIhAPBJ6qk9STEKA4H4h2PprGNtAIxtUszes4RKhIVPW21k","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66377},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"f8bb778a375828ca340a0050f1fedf103a8207b2","scripts":{"test":"bun test","build":"tsc && bun ../create-exports/create-exports.bin.ts","type-check":"tsc --noEmit"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.1","@types/node":"^24.9.2"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.7_1761814057004_0.12176767454090087","host":"s3://npm-registry-packages-npm-production"}},"2.0.8":{"name":"@cjkihl/bun-cors","version":"2.0.8","keywords":["cors","middleware","bun","http","cross-origin","security"],"author":{"name":"@cjkihl"},"license":"MIT","_id":"@cjkihl/bun-cors@2.0.8","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"dist":{"shasum":"9c5baf601fe13a82394e01bb09519e4afee57009","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.8.tgz","fileCount":11,"integrity":"sha512-CSm0QqlfsabHq+ykk6bxWc264qGXTzf1whBrIKXNCW6uIhoKGeRk+WTAse46DKhzLCwy2SyH4bqWZTYeDq6zEw==","signatures":[{"sig":"MEYCIQC+pv9NMo+4WxcRO1WbG9ea8g0QtOVvg8iI5/smkBTUBAIhANY3jy/6lIWKWFVxLYlxbX9LW9uF5lQ3ecWim2aQc4Iq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68624},"type":"module","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"funding":{"url":"https://github.com/sponsors/cjkihl","type":"github"},"gitHead":"6d3a24180ee3a3f9606cf4044f53ab28fdba9924","scripts":{"test":"bun test","build":"tsgo && bun ../create-exports/create-exports.bin.ts","type-check":"tsgo --noEmit"},"_npmUser":{"name":"caki0915","email":"carljohan.kihl@gmail.com"},"repository":{"url":"git+https://github.com/cjkihl/cjkihl.git","type":"git"},"_npmVersion":"10.8.2","description":"Cors middleware for bun","directories":{},"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.9","@types/node":"^24.10.13"},"_npmOperationalInternal":{"tmp":"tmp/bun-cors_2.0.8_1771202690189_0.28752342084482474","host":"s3://npm-registry-packages-npm-production"}},"2.0.9":{"name":"@cjkihl/bun-cors","version":"2.0.9","description":"Cors middleware for bun","keywords":["cors","middleware","bun","http","cross-origin","security"],"homepage":"https://github.com/cjkihl/cjkihl#readme","bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"repository":{"type":"git","url":"git+https://github.com/cjkihl/cjkihl.git"},"funding":{"type":"github","url":"https://github.com/sponsors/cjkihl"},"license":"MIT","author":{"name":"@cjkihl"},"type":"module","exports":{".":{"types":"./dist/types/index.pub.d.ts","default":"./dist/output/index.pub.js"}},"scripts":{"build":"tsgo && bun ../create-exports/create-exports.bin.ts","test":"bun test","type-check":"tsgo --noEmit"},"devDependencies":{"@types/bun":"^1.3.9","@types/node":"^24.10.13"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public","provenance":true},"gitHead":"95f2db961d1a037811b7170d21c967881361d91a","_id":"@cjkihl/bun-cors@2.0.9","_nodeVersion":"24.3.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-f4RVTgClDO2gMETYKkASDTaiiY9nAHMCeM+xtuFZO4cfZVJi2/l4T7Cdh0nPkgQBA8n4WMjck6RpP5SZEgS3uQ==","shasum":"867eec32202d2edbcca0f38cc06a321dba2ebc44","tarball":"https://registry.npmjs.org/@cjkihl/bun-cors/-/bun-cors-2.0.9.tgz","fileCount":11,"unpackedSize":68648,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cjkihl%2fbun-cors@2.0.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDQJM0fff34EOrxGS2xFktaD91dK/7aJ7E90vas6ioxzAiEAr+jAOQN+izvE2tbkA8MxxbMbcHwjqk7wrzofDaGuUtM="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:67269ad3-09bf-4393-b224-c49c308b39ec"}},"directories":{},"maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bun-cors_2.0.9_1774857663902_0.870524223407209"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-16T10:12:17.392Z","modified":"2026-03-30T08:01:04.321Z","0.0.1":"2025-02-16T10:12:17.729Z","2.0.0":"2025-06-19T08:00:15.015Z","2.0.1":"2025-06-20T02:42:05.434Z","2.0.2":"2025-06-26T02:50:31.816Z","2.0.3":"2025-09-12T08:08:54.556Z","2.0.4":"2025-10-05T09:36:45.355Z","2.0.5":"2025-10-06T05:12:20.564Z","2.0.6":"2025-10-16T04:22:30.972Z","2.0.7":"2025-10-30T08:47:37.200Z","2.0.8":"2026-02-16T00:44:50.323Z","2.0.9":"2026-03-30T08:01:04.043Z"},"bugs":{"url":"https://github.com/cjkihl/cjkihl/issues"},"author":{"name":"@cjkihl"},"license":"MIT","homepage":"https://github.com/cjkihl/cjkihl#readme","keywords":["cors","middleware","bun","http","cross-origin","security"],"repository":{"type":"git","url":"git+https://github.com/cjkihl/cjkihl.git"},"description":"Cors middleware for bun","maintainers":[{"name":"caki0915","email":"carljohan.kihl@gmail.com"}],"readme":"# @cjkihl/bun-cors\n\nA lightweight CORS middleware for Bun server applications. This package provides a simple and efficient way to handle Cross-Origin Resource Sharing (CORS) in your Bun applications.\n\n## Installation\n\n```bash\nbun add @cjkihl/bun-cors\n```\n\n## Quick Start\n\n```typescript\nimport { cors } from \"@cjkihl/bun-cors\";\n\nconst PORT = process.env.PORT || 4000;\n\nBun.serve({\n  fetch: cors(\n    async (req) => {\n      return new Response(\"Hello from Bun!\", { status: 200 });\n    },\n    {\n      origin: [\"http://localhost:3000\", \"https://myapp.com\"],\n      methods: [\"GET\", \"POST\", \"PUT\", \"DELETE\"],\n      credentials: true,\n    }\n  ),\n  port: PORT,\n});\n```\n\n## API\n\n### `cors(handler, options?)`\n\nCreates a CORS-enabled request handler.\n\n#### Parameters\n\n- `handler` (Function): Your request handler function that takes a `Request` and returns a `Promise<Response>`\n- `options` (CorsOptions, optional): CORS configuration options\n\n#### Returns\n\nA new request handler function that automatically handles CORS headers and preflight requests.\n\n## Configuration Options\n\n### `origin`\n\nSpecifies which origins are allowed to access the resource.\n\n- **Type**: `string | (string | RegExp)[]`\n- **Default**: `\"*\"` (allows all origins)\n\n```typescript\n// Allow specific origins\norigin: [\"http://localhost:3000\", \"https://myapp.com\"]\n\n// Allow all origins (default)\norigin: \"*\"\n\n// Use regex patterns\norigin: [/^https:\\/\\/.*\\.myapp\\.com$/, \"http://localhost:3000\"]\n```\n\n### `methods`\n\nSpecifies which HTTP methods are allowed.\n\n- **Type**: `string[]`\n- **Default**: `[\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\", \"OPTIONS\"]`\n\n```typescript\nmethods: [\"GET\", \"POST\", \"PUT\", \"DELETE\"]\n```\n\n### `headers`\n\nSpecifies which headers can be used in the actual request.\n\n- **Type**: `string[]`\n- **Default**: `[\"Content-Type\", \"Authorization\"]`\n\n```typescript\nheaders: [\"Content-Type\", \"Authorization\", \"X-Custom-Header\"]\n```\n\n### `maxAge`\n\nSpecifies how long (in seconds) the results of a preflight request can be cached.\n\n- **Type**: `number`\n- **Default**: `3600` (1 hour)\n\n```typescript\nmaxAge: 86400 // 24 hours\n```\n\n### `credentials`\n\nSpecifies whether the request can include user credentials like cookies, authorization headers, or TLS client certificates.\n\n- **Type**: `boolean`\n- **Default**: `false`\n\n```typescript\ncredentials: true\n```\n\n**Note**: When `credentials` is `true`, the `origin` cannot be `\"*\"` and must be a specific origin or array of origins.\n\n## Examples\n\n### Basic Usage\n\n```typescript\nimport { cors } from \"@cjkihl/bun-cors\";\n\nBun.serve({\n  fetch: cors(async (req) => {\n    return new Response(\"Hello World!\", { status: 200 });\n  }),\n  port: 3000,\n});\n```\n\n### Custom Configuration\n\n```typescript\nimport { cors } from \"@cjkihl/bun-cors\";\n\nBun.serve({\n  fetch: cors(\n    async (req) => {\n      const data = { message: \"Hello from API!\", timestamp: Date.now() };\n      return new Response(JSON.stringify(data), {\n        headers: { \"Content-Type\": \"application/json\" },\n        status: 200,\n      });\n    },\n    {\n      origin: [\"http://localhost:3000\", \"https://myapp.com\"],\n      methods: [\"GET\", \"POST\"],\n      headers: [\"Content-Type\", \"Authorization\", \"X-API-Key\"],\n      credentials: true,\n      maxAge: 7200, // 2 hours\n    }\n  ),\n  port: 4000,\n});\n```\n\n### With Authentication\n\n```typescript\nimport { cors } from \"@cjkihl/bun-cors\";\n\nBun.serve({\n  fetch: cors(\n    async (req) => {\n      // Your authentication logic here\n      const authHeader = req.headers.get(\"Authorization\");\n      if (!authHeader) {\n        return new Response(\"Unauthorized\", { status: 401 });\n      }\n\n      return new Response(\"Authenticated response\", { status: 200 });\n    },\n    {\n      origin: \"https://myapp.com\",\n      credentials: true,\n      headers: [\"Content-Type\", \"Authorization\"],\n    }\n  ),\n  port: 5000,\n});\n```\n\n### Development vs Production\n\n```typescript\nimport { cors } from \"@cjkihl/bun-cors\";\n\nconst isDevelopment = process.env.NODE_ENV === \"development\";\n\nBun.serve({\n  fetch: cors(\n    async (req) => {\n      return new Response(\"API Response\", { status: 200 });\n    },\n    {\n      origin: isDevelopment \n        ? [\"http://localhost:3000\", \"http://localhost:3001\"]\n        : [\"https://myapp.com\", \"https://admin.myapp.com\"],\n      credentials: true,\n      methods: [\"GET\", \"POST\", \"PUT\", \"DELETE\"],\n    }\n  ),\n  port: 4000,\n});\n```\n\n## Features\n\n- ✅ **Lightweight**: Minimal overhead and dependencies\n- ✅ **TypeScript Support**: Full type definitions included\n- ✅ **Flexible Origin Matching**: Support for exact strings and regex patterns\n- ✅ **Automatic Preflight Handling**: Handles OPTIONS requests automatically\n- ✅ **Credentials Support**: Full support for cookies and authentication headers\n- ✅ **Configurable Headers**: Customizable allowed headers and methods\n- ✅ **Caching Control**: Configurable preflight response caching\n\n## License\n\nMIT\n","readmeFilename":"README.md"}