{"_id":"@chubbyts/chubbyts-undici-cors","_rev":"10-4287c36b90ddfc5d1bfec5190cb769cb","name":"@chubbyts/chubbyts-undici-cors","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0-beta.1":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.0.0-beta.1","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.0.0-beta.1","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-undici-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-undici-cors/issues"},"dist":{"shasum":"8457d7c39217f0c0e9598cbb354b7d3e22a4c704","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.0.0-beta.1.tgz","fileCount":7,"integrity":"sha512-FUC4RsF6LKWnJDdJQOP7ABom8kwq2CEIwwMfAoa7kZM1T/4ipKKypu70G0y1lM2ggCrvFd2TrAflb8J91AtHXQ==","signatures":[{"sig":"MEYCIQD/Gnvk+G9oNdIWY9qSBAet8s9y8NzRjTQn67NpltLRqAIhAL4ojp6LuAOIsLRkAwP84+0RKretftutFsBlDtoMl1iq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14478},"type":"module","engines":{"node":">=20"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"gitHead":"c2877490c05ea68a7402b97b5a38d01624af8e12","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+https://github.com/chubbyts/chubbyts-undici-cors.git","type":"git"},"_npmVersion":"10.9.2","description":"A CORS middleware for @chubbyts/chubbyts-undici-server.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.0.0-beta.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.3","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^24.0.1","@vitest/coverage-v8":"^3.2.3","@stryker-mutator/core":"^9.0.1","@chubbyts/chubbyts-eslint":"^4.0.2","@chubbyts/chubbyts-packaging":"^4.0.0","@stryker-mutator/vitest-runner":"^9.0.1","@chubbyts/chubbyts-function-mock":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.0.0-beta.1_1757502746079_0.8661740387660208","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.0.0","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.0.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-undici-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-undici-cors/issues"},"dist":{"shasum":"e3d61466c9d3ce47ba7aeaceecae8380a2f7d3cc","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.0.0.tgz","fileCount":7,"integrity":"sha512-X0RXKBjbVRriC1MrZKUVXGg0ROq+95y0260ZcgPL4xlYJscgKPSKvQu+stqEYb9E18zGCwP5kUNX1MrPY9d86w==","signatures":[{"sig":"MEQCIAFPKKRRTPLNc+ErSDoNPK1de83D2weI8Qk/bd2N/X3JAiBwIlWpcR4CcfvPDklXUWexAWLNuIYJHom8zx4ncMUYzw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14191},"type":"module","engines":{"node":">=20"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"gitHead":"e26a4e7c68be874a3785e33393176191c5c759ba","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","prepare":"npm run build","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+https://github.com/chubbyts/chubbyts-undici-cors.git","type":"git"},"_npmVersion":"10.9.2","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^5.9.2","@types/node":"^24.3.1","@vitest/coverage-v8":"^3.2.4","@stryker-mutator/core":"^9.1.1","@chubbyts/chubbyts-eslint":"^4.0.7","@chubbyts/chubbyts-packaging":"^4.0.1","@stryker-mutator/vitest-runner":"^9.1.1","@chubbyts/chubbyts-function-mock":"^2.0.2"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.0.0_1757658160038_0.9651525544234658","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.0.1","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.0.1","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-undici-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-undici-cors/issues"},"dist":{"shasum":"8cc4bf3adaee35c3bddac2fb8143bc3d03a2ff0f","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.0.1.tgz","fileCount":7,"integrity":"sha512-CRAVd1VGaM9oowJ4Dn6xjLGu9J3B7Ua8MSJ2G8SzixTWnvzO8/1WSyM8S2ZifEAssiZs9mvWj+8zw8Jmf2sihQ==","signatures":[{"sig":"MEUCIQD0VuNcterMucohrXLEoYkOqMkkBBGUXXl6OJSTgvp4igIgI0oLdVrZNyDNGhM0hRaI2g9K8ifXWsY2P0RwN8Bnzgs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14158},"type":"module","_from":"file:chubbyts-chubbyts-undici-cors-1.0.1.tgz","engines":{"node":">=20"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"_resolved":"/tmp/76d0253b5365b097702f0ef9d39293d1/chubbyts-chubbyts-undici-cors-1.0.1.tgz","_integrity":"sha512-CRAVd1VGaM9oowJ4Dn6xjLGu9J3B7Ua8MSJ2G8SzixTWnvzO8/1WSyM8S2ZifEAssiZs9mvWj+8zw8Jmf2sihQ==","repository":{"url":"git+https://github.com/chubbyts/chubbyts-undici-cors.git","type":"git"},"_npmVersion":"11.9.0","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","prettier":"^3.8.1","typescript":"^5.9.3","@types/node":"^25.5.0","@vitest/coverage-v8":"^4.1.0","@stryker-mutator/core":"^9.6.0","@chubbyts/chubbyts-eslint":"^5.0.0","@chubbyts/chubbyts-packaging":"^4.0.1","@stryker-mutator/vitest-runner":"^9.6.0","@chubbyts/chubbyts-function-mock":"^2.0.4"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.0.1_1773690407583_0.3987067069137953","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.1.0","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.1.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-undici-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-undici-cors/issues"},"dist":{"shasum":"d3e4224c320dce1e21c90c37d6b91161bedd5ef2","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.1.0.tgz","fileCount":11,"integrity":"sha512-SxNBWKtYUgL2fp6UmexXhZ7URTNDk1gKVhM4lxpthPNyP7LJEH2YhhWh7ZswbJVjcDH+tT7M5+eQ3bafzA6o2w==","signatures":[{"sig":"MEQCIF2IDSK1ZoQV2PjJ6mMyaMQoJgg2CCridMlKLVXk7QvAAiAzDx/njYxlNmiCzB1CZ5lblg0eHu3g4LRzUzcyr3NWEw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21942},"pnpm":{"onlyBuiltDependencies":["esbuild","unrs-resolver"]},"type":"module","engines":{"node":">=20"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"gitHead":"746c73a65ef16135ab5e14dc696c3bbb7a82b874","scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","prepare":"pnpm run build","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+https://github.com/chubbyts/chubbyts-undici-cors.git","type":"git"},"_npmVersion":"11.9.0","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319","devDependencies":{"vitest":"^4.1.4","prettier":"^3.8.2","typescript":"^6.0.2","@types/node":"^25.6.0","@vitest/coverage-v8":"^4.1.4","@stryker-mutator/core":"^9.6.0","@chubbyts/chubbyts-eslint":"^5.0.0","@chubbyts/chubbyts-packaging":"^4.0.1","@stryker-mutator/vitest-runner":"^9.6.0","@chubbyts/chubbyts-function-mock":"^2.0.4"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.1.0_1775848599330_0.3191347232099919","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.1.1","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.1.1","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-undici-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-undici-cors/issues"},"dist":{"shasum":"7a715d0f42f64c20de0e6fe69890634212b66e66","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.1.1.tgz","fileCount":11,"integrity":"sha512-yt5VSeFl5X6Ld6CmOJc+8Sunz3TMhjBu8vf9s4VpKkRvScqdUC7MuatKJVxPGUNAEAhstFE7ntGBt2z4F8etmw==","signatures":[{"sig":"MEUCIQCFSQ9Uis1bUkhzEiYTml0eXMc2+v6ihhvSckHkP3caMQIgJXhsWejJAKox8gu3WzOHZQgXZMK1yRhYNN/LFIIts3A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21643},"type":"module","_from":"file:chubbyts-chubbyts-undici-cors-1.1.1.tgz","engines":{"node":">=22"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"tsc","cs-fix":"prettier --write src tests","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"_resolved":"/tmp/a82873172180825177b9ae14752220a5/chubbyts-chubbyts-undici-cors-1.1.1.tgz","_integrity":"sha512-yt5VSeFl5X6Ld6CmOJc+8Sunz3TMhjBu8vf9s4VpKkRvScqdUC7MuatKJVxPGUNAEAhstFE7ntGBt2z4F8etmw==","repository":{"url":"git+https://github.com/chubbyts/chubbyts-undici-cors.git","type":"git"},"_npmVersion":"11.12.1","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.4","prettier":"^3.8.3","typescript":"^6.0.3","@types/node":"^25.6.0","@vitest/coverage-v8":"^4.1.4","@stryker-mutator/core":"^9.6.1","@chubbyts/chubbyts-eslint":"^5.1.0","@chubbyts/chubbyts-packaging":"^4.0.1","@stryker-mutator/vitest-runner":"^9.6.1","@chubbyts/chubbyts-function-mock":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.1.1_1776514837119_0.9323883153031087","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.1.2","keywords":[],"author":{"name":"Dominik Zogg"},"license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.1.2","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"homepage":"https://github.com/chubbyts/chubbyts-undici-cors#readme","bugs":{"url":"https://github.com/chubbyts/chubbyts-undici-cors/issues"},"dist":{"shasum":"b34bfd5dcde23e67eff0bec968cec149e99b4b42","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.1.2.tgz","fileCount":7,"integrity":"sha512-nAKnPbr+wuEgLfx5xZW8toHsW8uP9oHWPQIWlerZKc9L45xL6QBdIuEuJN678hi9CFQc7d2bEZrYNfKkK65vpA==","signatures":[{"sig":"MEUCIGz/33hH/OInAmYzONZkjTwkfmzykHtElPH6IPD0lPsaAiEAioE3xO3o6J121beuXOaN+CmZSpDljdsTwmp38CJvfag=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14127},"type":"module","_from":"file:chubbyts-chubbyts-undici-cors-1.1.2.tgz","engines":{"node":">=22"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"rm -Rf dist && tsc","cs-fix":"prettier --write src tests","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"_resolved":"/tmp/1e19c4b05ce4a028c9d7cc74d72a0c1e/chubbyts-chubbyts-undici-cors-1.1.2.tgz","_integrity":"sha512-nAKnPbr+wuEgLfx5xZW8toHsW8uP9oHWPQIWlerZKc9L45xL6QBdIuEuJN678hi9CFQc7d2bEZrYNfKkK65vpA==","repository":{"url":"git+https://github.com/chubbyts/chubbyts-undici-cors.git","type":"git"},"_npmVersion":"11.12.1","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.4","prettier":"^3.8.3","typescript":"^6.0.3","@types/node":"^25.6.0","@vitest/coverage-v8":"^4.1.4","@stryker-mutator/core":"^9.6.1","@chubbyts/chubbyts-eslint":"^5.1.1","@stryker-mutator/vitest-runner":"^9.6.1","@chubbyts/chubbyts-function-mock":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.1.2_1776518710072_0.7469207907745161","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.1.3","keywords":[],"author":"Dominik Zogg","license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.1.3","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"dist":{"shasum":"dffb37ab1ff8f14c64505bc0b49bda0667324484","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.1.3.tgz","fileCount":7,"integrity":"sha512-rdULqaJEjLFLpfZJqeHrqt3rifwkddGjJ2hiLpL/pfrxzyj3rShSSWaOWgy7xXg8Zrc839qCrLWXbyqtWuzIWw==","signatures":[{"sig":"MEYCIQDHh7H0Nfk7HashuOuLfWPDYuM0to7EtRkeUefpK2w3tgIhAJKZBMbYZMeOPatjDHQK2OMUguD4al7AOqW2EOR92k0H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14127},"type":"module","engines":{"node":">=22"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"scripts":{"cs":"prettier --check src tests","lint":"eslint src tests","test":"vitest","build":"rm -Rf dist && tsc","cs-fix":"prettier --write src tests","lint-fix":"eslint src tests eslint.config.js vitest.config.ts --fix","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"repository":"chubbyts/chubbyts-undici-cors","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","prettier":"^3.8.3","typescript":"^6.0.3","@types/node":"^25.6.2","@vitest/coverage-v8":"^4.1.5","@stryker-mutator/core":"^9.6.1","@chubbyts/chubbyts-eslint":"^5.3.0","@stryker-mutator/vitest-runner":"^9.6.1","@chubbyts/chubbyts-function-mock":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.1.3_1778405933319_0.5606460944078993","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.2.0","keywords":[],"author":"Dominik Zogg","license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.2.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"dist":{"shasum":"7811dad7e506b3ccf97a9829524cb0b0abc6f66d","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.2.0.tgz","fileCount":7,"integrity":"sha512-2Yl+sra/uchaI6SwZUY0qYXns1KJXx3meXN4m5ziOtR5VpXp5rux0XBi5VE1CSG9+cSMHbPWj/Mwdhq4gtMY4g==","signatures":[{"sig":"MEUCIQDo5FKD7XJ2KDMHtt7IoD05oW8dS3DQ962D1mmFPGprowIgUI34zynPeUvI0kvqSSMYphnxkQ1qNtpRbk3V65d8Wlc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14124},"type":"module","engines":{"node":">=22"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"scripts":{"cs":"prettier --check src tests","lint":"oxlint src tests vitest.config.ts","test":"vitest","build":"rm -Rf dist && tsc","cs-fix":"prettier --write src tests","lint-fix":"oxlint --fix src tests vitest.config.ts","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"repository":"chubbyts/chubbyts-undici-cors","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"oxlint":"^1.75.0","vitest":"^4.1.10","prettier":"^3.9.6","typescript":"^7.0.2","@types/node":"^26.1.1","@vitest/coverage-v8":"^4.1.10","@stryker-mutator/core":"^9.6.1","@chubbyts/chubbyts-oxlint":"^1.0.0","@stryker-mutator/vitest-runner":"^9.6.1","@chubbyts/chubbyts-function-mock":"^2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.2.0_1785266074867_0.6948857035388176","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@chubbyts/chubbyts-undici-cors","version":"1.3.0","keywords":[],"author":"Dominik Zogg","license":"MIT","_id":"@chubbyts/chubbyts-undici-cors@1.3.0","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"dist":{"shasum":"7be0eebf8802b59198ec0733fc7400084af73e21","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.3.0.tgz","fileCount":7,"integrity":"sha512-otY0Eu0Ma/gQwErRYq29MwK4xyzu5Z9DSyEsnWtBVOdGQLHkvezVhzkFnMcQnX2xfPjuowYPpgHWyjX88w/QAQ==","signatures":[{"sig":"MEQCIAIimSg9/24MWM8rPaexYGlA84YMO8Vkk9G3fqVuC+rnAiBemXsMNWFpBq/81WVFgTKLybKUxzi0FnDZA3ZLCcKPtA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15022},"type":"module","engines":{"node":">=22"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"scripts":{"cs":"prettier --check src tests","lint":"oxlint src tests vitest.config.ts","test":"vitest","build":"rm -Rf dist && tsc","cs-fix":"prettier --write src tests","lint-fix":"oxlint --fix src tests vitest.config.ts","infection":"stryker run"},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"prettier":{"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"all"},"repository":"chubbyts/chubbyts-undici-cors","description":"A minimal cors middleware for chubbyts-undici-server.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@chubbyts/chubbyts-undici-server":"^1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"oxlint":"^1.75.0","vitest":"^4.1.10","prettier":"^3.9.6","typescript":"^7.0.2","@types/node":"^26.1.1","@vitest/coverage-v8":"^4.1.10","@stryker-mutator/core":"^9.6.1","@chubbyts/chubbyts-oxlint":"^1.0.0","@stryker-mutator/vitest-runner":"^9.6.1","@chubbyts/chubbyts-function-mock":"^2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/chubbyts-undici-cors_1.3.0_1785267490555_0.988959040503967","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@chubbyts/chubbyts-undici-cors","type":"module","version":"1.4.0","description":"A minimal cors middleware for chubbyts-undici-server.","keywords":[],"author":"Dominik Zogg","license":"MIT","repository":{"type":"git","url":"chubbyts/chubbyts-undici-cors"},"prettier":{"printWidth":120,"tabWidth":2,"singleQuote":true,"trailingComma":"all"},"exports":{"./*":{"types":"./*.d.ts","import":"./*.js","default":"./*.js"}},"engines":{"node":">=22"},"dependencies":{"@chubbyts/chubbyts-dic-config-factory":"^1.0.0","@chubbyts/chubbyts-dic-types":"^2.3.0","@chubbyts/chubbyts-undici-server":"^1.2.0"},"devDependencies":{"@chubbyts/chubbyts-dic-config":"^2.3.0","@chubbyts/chubbyts-function-mock":"^2.3.0","@chubbyts/chubbyts-oxlint":"^1.0.1","@stryker-mutator/core":"^9.6.1","@stryker-mutator/vitest-runner":"^9.6.1","@types/node":"^26.1.2","@vitest/coverage-v8":"^4.1.10","oxlint":"^1.77.0","prettier":"^3.9.6","typescript":"^7.0.2","vitest":"^4.1.10"},"publishConfig":{"access":"public"},"scripts":{"build":"rm -Rf dist && tsc","cs-fix":"prettier --write src tests","cs":"prettier --check src tests","infection":"stryker run","lint-fix":"oxlint --fix src tests vitest.config.ts","lint":"oxlint src tests vitest.config.ts","test":"vitest"},"_nodeVersion":"24.19.0","_id":"@chubbyts/chubbyts-undici-cors@1.4.0","dist":{"integrity":"sha512-U27pap1n7XP9lpwb8HE3GL+teunIgeta8wfUQZVWhe4EfirbqTwK71u7spsVrqH3j2S8HgQnRyFUmoeOSu4jSw==","shasum":"bf17c5ae14f47386332f5da50fd96257b63faec8","tarball":"https://registry.npmjs.org/@chubbyts/chubbyts-undici-cors/-/chubbyts-undici-cors-1.4.0.tgz","fileCount":9,"unpackedSize":21759,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDRq1y7U1kqEH6y4qnuPiwnr1EXAiYD8jqe8xx3uSVZ2gIhAP/yaxoIlqHLn9jfyElYZOKwAZ3WL+4ZVy1R6SnSTj3V"}]},"_npmUser":{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"},"directories":{},"maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chubbyts-undici-cors_1.4.0_1787496541837_0.008112615310160942"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-10T11:12:25.971Z","modified":"2026-08-23T14:49:02.219Z","1.0.0-beta.1":"2025-09-10T11:12:26.268Z","1.0.0":"2025-09-12T06:22:40.211Z","1.0.1":"2026-03-16T19:46:47.740Z","1.1.0":"2026-04-10T19:16:39.462Z","1.1.1":"2026-04-18T12:20:37.274Z","1.1.2":"2026-04-18T13:25:10.221Z","1.1.3":"2026-05-10T09:38:53.458Z","1.2.0":"2026-07-28T19:14:35.021Z","1.3.0":"2026-07-28T19:38:10.688Z","1.4.0":"2026-08-23T14:49:01.973Z"},"author":"Dominik Zogg","license":"MIT","keywords":[],"repository":{"type":"git","url":"chubbyts/chubbyts-undici-cors"},"description":"A minimal cors middleware for chubbyts-undici-server.","maintainers":[{"name":"dominikzogg","email":"dominik.zogg@ikmail.com"}],"readme":"# chubbyts-undici-cors\n\n[![CI](https://github.com/chubbyts/chubbyts-undici-cors/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/chubbyts/chubbyts-undici-cors/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyts/chubbyts-undici-cors/badge.svg?branch=master)](https://coveralls.io/github/chubbyts/chubbyts-undici-cors?branch=master)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyts%2Fchubbyts-undici-cors%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyts/chubbyts-undici-cors/master)\n[![npm-version](https://img.shields.io/npm/v/@chubbyts/chubbyts-undici-cors.svg)](https://www.npmjs.com/package/@chubbyts/chubbyts-undici-cors)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyts_chubbyts-undici-cors&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyts_chubbyts-undici-cors)\n\n## Description\n\nA minimal cors middleware for chubbyts-undici-server.\n\n## Requirements\n\n * node: 22\n * [@chubbyts/chubbyts-dic-config-factory][5]: ^1.0.0\n * [@chubbyts/chubbyts-dic-types][3]: ^2.3.0\n * [@chubbyts/chubbyts-undici-server][2]: ^1.2.0\n\n## Installation\n\nThrough [NPM](https://www.npmjs.com) as [@chubbyts/chubbyts-undici-cors][1].\n\n```ts\nnpm i @chubbyts/chubbyts-undici-cors@^1.4.0\n```\n\n## Usage\n\n```ts\nimport { createCorsMiddleware } from '@chubbyts/chubbyts-undici-cors/dist/middleware';\nimport {\n  createAllowOriginRegex,\n  createHeadersNegotiator,\n  createMethodNegotiator,\n  createOriginNegotiator,\n} from '@chubbyts/chubbyts-undici-cors/dist/negotiation';\nimport { Handler, Response, ServerRequest } from '@chubbyts/chubbyts-undici-server/dist/server';\n\nconst corsMiddleware = createCorsMiddleware(\n  createOriginNegotiator([createAllowOriginRegex(/^https?\\:\\/\\/localhost(\\:\\d+)?$/)]),\n  createMethodNegotiator(['GET', 'POST', 'PUT', 'DELETE']),\n  createHeadersNegotiator(['Content-Type', 'Accept']),\n);\n\nconst handler: Handler = async (serverRequest: ServerRequest) => {\n  return new Response();\n};\n\n(async () => {\n  const serverRequest = new ServerRequest();\n  const response = await corsMiddleware(serverRequest, handler);\n})();\n```\n\n**Warning:** When using `createAllowOriginRegex`, always anchor the pattern with `^` and `$` and escape dots. An unanchored pattern like `/example\\.com/` also matches unintended origins such as `https://evil-example.com` or `https://example.com.attacker.tld`.\n\n### Service factories (chubbyts-dic-config)\n\nThe package ships service factories (abstract factories built on [chubbyts-dic-config-factory][5]) for a [chubbyts-dic-config][4] (or any [chubbyts-dic-types][3] compatible) container within `@chubbyts/chubbyts-undici-cors/dist/service-factory`, configured through `config.chubbyts.cors`:\n\n```ts\nimport type { ConfigFactory } from '@chubbyts/chubbyts-dic-config/dist/dic-config';\nimport { createContainerByConfigFactory } from '@chubbyts/chubbyts-dic-config/dist/dic-config';\nimport type { CorsConfig } from '@chubbyts/chubbyts-undici-cors/dist/service-factory';\nimport { corsMiddlewareServiceFactory } from '@chubbyts/chubbyts-undici-cors/dist/service-factory';\nimport type { Middleware } from '@chubbyts/chubbyts-undici-server/dist/server';\n\nconst container = createContainerByConfigFactory({\n  chubbyts: {\n    cors: {\n      allowOrigins: {\n        createAllowOriginExact: ['https://app.example.com'],\n        createAllowOriginRegex: [/^https?\\:\\/\\/localhost(\\:\\d+)?$/],\n      },\n      allowMethods: ['GET', 'POST', 'PUT', 'DELETE'],\n      allowHeaders: ['Content-Type', 'Accept'],\n      // exposeHeaders: [],\n      // allowCredentials: false,\n      // maxAge: 600,\n    } satisfies CorsConfig,\n  },\n  dependencies: {\n    factories: new Map<string, ConfigFactory>([['corsMiddleware', corsMiddlewareServiceFactory()]]),\n  },\n})();\n\nconst corsMiddleware = container.get<Middleware>('corsMiddleware');\n```\n\nThe `corsMiddlewareServiceFactory` uses the services `corsOriginNegotiator`, `corsMethodNegotiator` and `corsHeadersNegotiator` of the container if registered, and creates them through the shipped `originNegotiatorServiceFactory`, `methodNegotiatorServiceFactory` and `headersNegotiatorServiceFactory` otherwise. Register any of them under its name to replace it (e.g. a custom `OriginNegotiator`) or to share it with other services.\n\n#### With names\n\nTo serve different parts of an api with different cors rules, the same factories can be registered multiple times with a name: the config is then read from `config.chubbyts.cors.<name>` and the name gets appended to each service id (`corsMiddlewareapi`, `corsOriginNegotiatorapi`, ...).\n\n```ts\nconst container = createContainerByConfigFactory({\n  chubbyts: {\n    cors: {\n      api: { allowOrigins: { createAllowOriginExact: ['https://app.example.com'] }, allowMethods: ['GET', 'POST'] },\n      admin: { allowOrigins: { createAllowOriginExact: ['https://admin.example.com'] }, allowMethods: ['GET', 'DELETE'] },\n    } satisfies Record<string, CorsConfig>,\n  },\n  dependencies: {\n    factories: new Map<string, ConfigFactory>([\n      ['corsMiddlewareapi', corsMiddlewareServiceFactory('api')],\n      ['corsMiddlewareadmin', corsMiddlewareServiceFactory('admin')],\n    ]),\n  },\n})();\n\nconst apiCorsMiddleware = container.get<Middleware>('corsMiddlewareapi');\nconst adminCorsMiddleware = container.get<Middleware>('corsMiddlewareadmin');\n```\n\n## Copyright\n\n2026 Dominik Zogg\n\n[1]: https://www.npmjs.com/package/@chubbyts/chubbyts-undici-cors\n[2]: https://www.npmjs.com/package/@chubbyts/chubbyts-undici-server\n[3]: https://www.npmjs.com/package/@chubbyts/chubbyts-dic-types\n[4]: https://www.npmjs.com/package/@chubbyts/chubbyts-dic-config\n[5]: https://www.npmjs.com/package/@chubbyts/chubbyts-dic-config-factory\n","readmeFilename":""}