{"_id":"@bunny.net/upload-nuxt","_rev":"3-3e5b823f3d693ceca0a464ed9aa83968","name":"@bunny.net/upload-nuxt","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@bunny.net/upload-nuxt","version":"0.0.1","_id":"@bunny.net/upload-nuxt@0.0.1","maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"dist":{"shasum":"7842f044a3c4dfd9ec47ccdc64c275be993cf889","tarball":"https://registry.npmjs.org/@bunny.net/upload-nuxt/-/upload-nuxt-0.0.1.tgz","fileCount":8,"integrity":"sha512-iRkEI9gaT3xsPHHAblNEKYhrQt9gzxxzeJDZ/keb84yp+p9KJ/BmpSzqz9z+GUNRE8qQrjGhPtfJ0iGk1jvPrA==","signatures":[{"sig":"MEYCIQDkK0HiTBu3TKqwAJOcwIlI1aaAcY4yzpIm6QxXgiRzzgIhAPjx3ot7wkh8lGna63V99XFXhAzGpBAiWF8j//ZxILC8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6551},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"e30b7b82d2997aaa97925aead3cee193bfe1935e","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"notrab","email":"jamie@notrab.dev"},"_npmVersion":"10.8.2","description":"Nuxt server route adapter for [bunny-upload](../../README.md).","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@bunny.net/upload-handler":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"h3":"^1.15.0","tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"peerDependencies":{"h3":">=1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/upload-nuxt_0.0.1_1774534838113_0.8783108713711403","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bunny.net/upload-nuxt","version":"0.0.2","_id":"@bunny.net/upload-nuxt@0.0.2","maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"dist":{"shasum":"87257f6787f773a5dae5bffc939b1e22abcf15d4","tarball":"https://registry.npmjs.org/@bunny.net/upload-nuxt/-/upload-nuxt-0.0.2.tgz","fileCount":8,"integrity":"sha512-NG8B0Pysu+qmVbZRv/tugCjQcCfWEaYMm/Fk4moEm22JePn4jUOebFoP7E05hAc+bu5XCAOqjjY+6azra9hJAA==","signatures":[{"sig":"MEYCIQDhj41Ygd0hFNGsVnXyRnIv0nhrV/+dB0dII8rAjxdmTAIhALFq2nHRS2AjyEnKChoYrFr5V2NhgtnqmASgQm0Fa7je","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6545},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"93aa8ca7a45d19966df2a8f738e18ca517a03e01","scripts":{"dev":"tsup --watch","test":"vitest run --passWithNoTests","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"notrab","email":"jamie@notrab.dev"},"_npmVersion":"10.8.2","description":"Nuxt server route adapter for [bunny-upload](../../README.md).","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@bunny.net/upload-handler":"0.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"h3":"^1.15.0","tsup":"^8.0.0","vitest":"^2.0.0","typescript":"^5.5.0"},"peerDependencies":{"h3":">=1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/upload-nuxt_0.0.2_1774539271808_0.3887705531588179","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@bunny.net/upload-nuxt","publishConfig":{"access":"public"},"version":"0.0.3","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run --passWithNoTests","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"dependencies":{"@bunny.net/upload-handler":"0.0.3"},"peerDependencies":{"h3":">=1.8.0"},"devDependencies":{"h3":"^1.15.0","tsup":"^8.0.0","typescript":"^5.5.0","vitest":"^2.0.0"},"_id":"@bunny.net/upload-nuxt@0.0.3","gitHead":"22a1e36f992119d04c502b6773b220dd45df15ea","description":"Nuxt server route adapter for [bunny-upload](../../README.md).","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-eYUG6PMxX44ZLAtQhA4XuF4W2kYST2GZ13JgB/6nEQzwZx/QLH81Vif25Z3+i9dt82uPo02BLsYPxWDeYQFZqA==","shasum":"9d5cb939d3d46127e81cb30c17e328fc63ace4f7","tarball":"https://registry.npmjs.org/@bunny.net/upload-nuxt/-/upload-nuxt-0.0.3.tgz","fileCount":8,"unpackedSize":6545,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICVBBI+BDw8xI0wtWvXV2Qqsp05tNGz2axHw25XBKB3EAiEAi8LMX/xncgCtKDWhAMfYyItpEKfISsnrTUCzY7sEOlM="}]},"_npmUser":{"name":"notrab","email":"jamie@notrab.dev"},"directories":{},"maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/upload-nuxt_0.0.3_1779438058419_0.5557356923884764"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-26T14:20:38.018Z","modified":"2026-05-22T08:20:58.700Z","0.0.1":"2026-03-26T14:20:38.253Z","0.0.2":"2026-03-26T15:34:31.990Z","0.0.3":"2026-05-22T08:20:58.557Z"},"description":"Nuxt server route adapter for [bunny-upload](../../README.md).","maintainers":[{"name":"kevin_at_bunny","email":"kevin@bunny.net"},{"name":"antho-bunny","email":"anthony@bunny.net"},{"name":"notrab","email":"jamie@notrab.dev"},{"name":"bogdan-at-bunny","email":"bogdan@bunny.net"}],"readme":"# @bunny.net/upload-nuxt\n\nNuxt server route adapter for [bunny-upload](../../README.md).\n\n## Install\n\n```bash\nnpm install @bunny.net/upload-vue @bunny.net/upload-handler @bunny.net/upload-nuxt\n```\n\n## Setup\n\n### 1. Create the server route\n\n```ts\n// server/routes/.bunny/upload.post.ts\nimport { defineBunnyUploadHandler } from \"@bunny.net/upload-nuxt\";\nimport { createBunnyUploadHandler } from \"@bunny.net/upload-handler\";\n\nexport default defineBunnyUploadHandler(\n  createBunnyUploadHandler({\n    restrictions: {\n      maxFileSize: \"10mb\",\n      allowedTypes: [\"image/*\"],\n      maxFiles: 5,\n    },\n    getPath: (file) => `/uploads/${Date.now()}-${file.name}`,\n  })\n);\n```\n\n### 2. Add environment variables\n\n```env\nBUNNY_STORAGE_ZONE=my-zone\nBUNNY_STORAGE_PASSWORD=my-password\nBUNNY_CDN_BASE=https://my-zone.b-cdn.net\n```\n\n### 3. Add the component\n\n```vue\n<script setup lang=\"ts\">\nimport { BunnyUpload, type UploadResult } from \"@bunny.net/upload-vue\";\n\nfunction onComplete(files: UploadResult[]) {\n  console.log(\"Uploaded:\", files);\n}\n</script>\n\n<template>\n  <BunnyUpload\n    :accept=\"['image/*']\"\n    max-size=\"10mb\"\n    :max-files=\"5\"\n    @complete=\"onComplete\"\n  />\n</template>\n```\n\n## API\n\n### `defineBunnyUploadHandler(handler)`\n\nWraps a handler function for use as a Nuxt server route. Converts between Nuxt's H3 events and standard `Request`/`Response`.\n\n```ts\nexport default defineBunnyUploadHandler(handler);\n```\n\nThe `handler` is any function with signature `(request: Request) => Promise<Response>` — typically from `createBunnyUploadHandler()`.\n\n## Configuration\n\nSee [`@bunny.net/upload-handler`](../handler) for all server-side options and [`@bunny.net/upload-vue`](../vue) for client-side options.\n","readmeFilename":"README.md"}