{"_id":"@boywithkeyboard/turnstile","_rev":"3-ac633c697b689eacb9130e447c9d7193","name":"@boywithkeyboard/turnstile","description":"A type-safe server-side validator for Turnstile, Cloudflare's free CAPTCHA solution.","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@boywithkeyboard/turnstile","version":"1.0.0","author":{"url":"https://samuelkopp.de","name":"Samuel Kopp"},"license":"Apache-2.0","_id":"@boywithkeyboard/turnstile@1.0.0","maintainers":[{"name":"boywithkeyboard","email":"azury.wtf@gmail.com"}],"dist":{"shasum":"2058e253803f18f5ebbbc001055c2c664f32f0fa","tarball":"https://registry.npmjs.org/@boywithkeyboard/turnstile/-/turnstile-1.0.0.tgz","fileCount":6,"integrity":"sha512-Ux/bpeydKsRB0TwJem/kbnCgNxcbz1eBl+IICjiQ1qGrhiU76ovWsy38E7AiXot2PDW1vhwvUfCRvDo1qHrf0g==","signatures":[{"sig":"MEUCIQCO2UCFOcyoZg5EMvALkM0cFNbjx3RTiNLP2qvhaTwh0wIgLD0GkN0zYH87uSAAw2sQuh4WZE5/o6LfA05t5aGwcS8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15785},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"funding":"https://github.com/sponsors/boywithkeyboard","gitHead":"f453af054eed3a98764f9544f91ba75f6172382c","scripts":{"build":"builder --esm --cjs && tsc"},"_npmUser":{"name":"boywithkeyboard","email":"azury.wtf@gmail.com"},"_npmVersion":"9.8.1","description":"A type-safe server-side validator for Turnstile, Cloudflare's free CAPTCHA alternative.","directories":{},"_nodeVersion":"18.18.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.2.2","@types/node":"^20.8.10","@boywithkeyboard/builder":"^0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/turnstile_1.0.0_1699102226677_0.813422266161363","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@boywithkeyboard/turnstile","version":"1.0.1","author":{"url":"https://samuelkopp.de","name":"Samuel Kopp"},"license":"Apache-2.0","_id":"@boywithkeyboard/turnstile@1.0.1","maintainers":[{"name":"boywithkeyboard","email":"azury.wtf@gmail.com"}],"homepage":"https://github.com/boywithkeyboard/turnstile#readme","bugs":{"url":"https://github.com/boywithkeyboard/turnstile/issues"},"dist":{"shasum":"a14ac776b41653291b6d1bf73f7591780fd78f5e","tarball":"https://registry.npmjs.org/@boywithkeyboard/turnstile/-/turnstile-1.0.1.tgz","fileCount":3,"integrity":"sha512-n2AqMbv+ivka1zZbGsgtx/3CgGz+G6gN2jyeZFa9aUlz5jyr7EyDnQVZ9bFsO3HQjr+lMtX72fHOYqWcKAUY9w==","signatures":[{"sig":"MEUCIQDEBsSfxrXMidPkQIz3vUhYW8XsRQ5Vg3MOp+pgkjJDqQIgc5l+ZVEiSwzDKA6K4QmGRy1TEMMZpmvTvKndZQJtf0Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12407},"main":"./dist/index.cjs","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"funding":"https://github.com/sponsors/boywithkeyboard","gitHead":"c261680792647d45ac839a9246956ad794e70c03","scripts":{"build":"builder --esm --cjs && tsc"},"_npmUser":{"name":"boywithkeyboard","email":"azury.wtf@gmail.com"},"repository":{"url":"git+https://github.com/boywithkeyboard/turnstile.git","type":"git"},"_npmVersion":"9.8.1","description":"A type-safe server-side validator for Turnstile, Cloudflare's free CAPTCHA alternative.","directories":{},"_nodeVersion":"18.18.2","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.2.2","@types/node":"^20.8.10","@boywithkeyboard/builder":"^0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/turnstile_1.0.1_1699228050744_0.2381748852145411","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@boywithkeyboard/turnstile","version":"2.0.0","keywords":["cloudflare","turnstile","captcha"],"author":{"url":"https://samuelkopp.de","name":"Samuel Kopp"},"license":"MIT","_id":"@boywithkeyboard/turnstile@2.0.0","maintainers":[{"name":"boywithkeyboard","email":"azury.wtf@gmail.com"}],"homepage":"https://github.com/boywithkeyboard/turnstile#readme","bugs":{"url":"https://github.com/boywithkeyboard/turnstile/issues"},"dist":{"shasum":"67152293408fbd08165a9e2567b30fe9b82447d3","tarball":"https://registry.npmjs.org/@boywithkeyboard/turnstile/-/turnstile-2.0.0.tgz","fileCount":5,"integrity":"sha512-t+VkvTWF49uNtHwjZ0edcDL45DmK3Hy1wAiLlT5T37QukLpVBmiDWM0sp1avHprvJmDGQYeCs9P2xdmHBLq/uw==","signatures":[{"sig":"MEUCIEi8Ig1HioG6R+IHP+AIsBOZFy2H839xaBNd4/fR8e7jAiEA/rQVNBM2YXqkU+INGNvOii4hx3Im60wyzl6/Lps4hpw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@boywithkeyboard%2fturnstile@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5251},"main":"./index.js","type":"module","types":"./index.d.ts","module":"./index.js","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./index.d.ts","default":"./index.js"}}},"funding":"https://github.com/sponsors/boywithkeyboard","gitHead":"f6e9af26ddbfa1d64dc07609fa0e6e25276601e2","scripts":{"build":"builder index.ts:index.js"},"_npmUser":{"name":"boywithkeyboard","email":"azury.wtf@gmail.com"},"repository":{"url":"git+https://github.com/boywithkeyboard/turnstile.git","type":"git"},"_npmVersion":"10.2.4","description":"A type-safe server-side validator for Turnstile, Cloudflare's free CAPTCHA solution.","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.3","@boywithkeyboard/builder":"^0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/turnstile_2.0.0_1711043420828_0.5178180458919335","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-11-04T12:50:26.500Z","modified":"2024-06-27T00:19:48.649Z","1.0.0":"2023-11-04T12:50:26.879Z","1.0.1":"2023-11-05T23:47:30.899Z","2.0.0":"2024-03-21T17:50:20.996Z"},"maintainers":[{"email":"azury.wtf@gmail.com","name":"sakuta96"}],"author":{"url":"https://samuelkopp.de","name":"Samuel Kopp"},"repository":{"url":"git+https://github.com/boywithkeyboard/turnstile.git","type":"git"},"keywords":["cloudflare","turnstile","captcha"],"license":"MIT","homepage":"https://github.com/boywithkeyboard/turnstile#readme","bugs":{"url":"https://github.com/boywithkeyboard/turnstile/issues"},"readme":"## turnstile\n\n> [!IMPORTANT]  \n> Please [read this article](https://developers.cloudflare.com/turnstile/get-started/server-side-validation) to learn more.\n\n### Setup\n\n#### Deno\n\n```ts\nimport { turnstile } from 'https://esm.sh/@boywithkeyboard/turnstile'\n```\n\n#### Node.js\n\n```bash\nnpm i @boywithkeyboard/turnstile\n```\n\n```ts\nimport { turnstile } from '@boywithkeyboard/turnstile'\n```\n\n### Usage\n\n```ts\nasync function handleRequest(req) {\n  const body = await req.formData()\n\n  const result = await turnstile.verify({\n    secret: '...',\n    response: body.get('cf-turnstile-response'),\n    ip: req.headers.get('cf-connecting-ip')\n  })\n}\n```\n","readmeFilename":"readme.md"}