{"_id":"next-safe-route","_rev":"28-9999c0dcd39759fe8425549672047a1d","name":"next-safe-route","dist-tags":{"latest":"0.0.20"},"versions":{"0.0.2":{"name":"next-safe-route","version":"0.0.2","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.2","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"5b636d5bd7d38eefb8035e90e7f8bcb93b110559","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.2.tgz","fileCount":3,"integrity":"sha512-HuMNQTcnaqXV5EdYaugw2AdHTAl7J4wYJLIk9zJmqRL0RCcyJ1Kz2q9h6MuWq3zW5izHGMd74FQcpmOt/fkSNA==","signatures":[{"sig":"MEUCIQDz2o5ufWsXCbvRDYs/H7k1QyxNpweYEgCdDL66uufy9gIgK+8BRpjtaJOhA8LFRpNhgkSZTGPrAfcvAcqPPWY1Rmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3397},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"4d344350e2f5f28c62cd2b504b8a45afd8bfb0d3","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm format"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"yup":"^1.4.0","zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.1","@swc/core":"^1.5.25","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.5","@typeschema/yup":"^0.13.3","@typeschema/zod":"^0.13.3","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.2_1717971442486_0.4307258912998928","host":"s3://npm-registry-packages"}},"0.0.13":{"name":"next-safe-route","version":"0.0.13","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.13","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"721a6eca794800a4a70a348ce22f74725b12e1c4","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.13.tgz","fileCount":9,"integrity":"sha512-DavxfCnAb7sLiG57DRBAEM6t0fHVQBO7JJeyrMmK7AUk3XgD2NYIa3m9xxUowHaNhvKvVbolfmGIejjxD1VKGQ==","signatures":[{"sig":"MEQCIHvOUMJW50FBlup/jQrIbKaDqx2xVv/DN+eGnGU9h7czAiB4C9T1eh8OAao6M9jKIEncNmQbSFSKQhHNTZbopvVzyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20559},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"60290b89884fecb13187680ad12da97dfba3843d","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"yup":"^1.4.0","zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.1","@swc/core":"^1.5.25","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.5","@typeschema/yup":"^0.13.3","@typeschema/zod":"^0.13.3","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.13_1717975601826_0.10800048609577062","host":"s3://npm-registry-packages"}},"0.0.14":{"name":"next-safe-route","version":"0.0.14","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.14","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"f040337b0d1249131e269dc7169503432ef6d583","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.14.tgz","fileCount":9,"integrity":"sha512-75y7GbSaZagQzPN/3UGFgkCadQ8WZ9U7bNGcZpWXdIHplPuy0mT21c6Ggi2R0V2wi9AEX1pOaCH9HFL72KonKg==","signatures":[{"sig":"MEUCIC1Fh8ki2L2qbccao9Nbwp+Ey1py5qs1VpCZI8YQL4N9AiEAmj6Fwc11ZSQXwikA/+aPo94oChKIbRutt8eWbgbGx2w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20691},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"63ca079eb47c4b9f557ecb7ed080cb5822671dca","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"yup":"^1.4.0","zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.1","@swc/core":"^1.5.25","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.5","@typeschema/yup":"^0.13.3","@typeschema/zod":"^0.13.3","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.14_1717977766319_0.7230436808445517","host":"s3://npm-registry-packages"}},"0.0.15":{"name":"next-safe-route","version":"0.0.15","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.15","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"f7fb33cc5151b29caa90d41096b6e255c51f71f4","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.15.tgz","fileCount":9,"integrity":"sha512-kdlzljDTAJ9oyTcFQ5ZFHWlMM5QZn+RDDYCHpns8XTLfU07o03mvS903tTn3KkEYR6rczMP5D2KCjCDZSrvI5g==","signatures":[{"sig":"MEQCIAKp7ETPy6CbFdeACQPXBpiKkWFByk/DmXVhAGyfhA7cAiAoyFsdAP3qG2KJCyDwEtrM4N+ndYnv1ivNwOBsCFkSag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23393},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"185dd32bea8a8c3b3d85c8de8ee91423f6759ae4","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/zod":"^0.13.3","@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.1","@swc/core":"^1.5.25","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.5","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.15_1718006729629_0.04173630501752723","host":"s3://npm-registry-packages"}},"0.0.16":{"name":"next-safe-route","version":"0.0.16","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.16","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"ce5d9633edcffb9e7256d5abf0dc555fc7b3d52b","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.16.tgz","fileCount":9,"integrity":"sha512-RIZD6bW29R3/mlAOnd+5zRRoAXreu3kLppTcuP0QkKTgerYhYSUx0rtx3fJ7q2SuNlMu+98Gf8/9MQDr7vXl2g==","signatures":[{"sig":"MEUCIQDPPGH7OPk4KKlw4IBbbyufGmR/ZCXU9IVveEA0drXVYwIgbJuAETo+hHBTX4v94f+HZGktBk6OjCWExZ7lcScj+mM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23608},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"54ea98a539c84fe5e0a1bddf232e38976f176ff6","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/zod":"^0.13.3","@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.1","@swc/core":"^1.5.25","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.5","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.16_1718008612652_0.6557599547650041","host":"s3://npm-registry-packages"}},"0.0.17":{"name":"next-safe-route","version":"0.0.17","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.17","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"401b00ca9977bfc032f1786a18a7ee5c030962ef","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.17.tgz","fileCount":9,"integrity":"sha512-4sSWCeltruO7FthgJFsqMRrSRy+YUMxirYtSTCRaCs/274Ys+LzXRyq1cDbstKerAVWtTbZ1GKXMDDYkX4uJXQ==","signatures":[{"sig":"MEUCIBeeDi0Peg4ES1JSOeaKR/xxUua1wj5jAasCHU8ME1ZSAiEA/V/TxzypQbdcsG0EA9cxtqn+G/MX3SQQ28MAvgIDFtc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23508},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"3e4d8d7fad76c9a5906c38800a17ba0422deb836","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/zod":"^0.13.3","@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.1","@swc/core":"^1.5.25","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.5","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.17_1718042509401_0.9166306429420723","host":"s3://npm-registry-packages"}},"0.0.18":{"name":"next-safe-route","version":"0.0.18","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.18","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"aaf0e3b67ff4230e5efe03b637c20ebbe38758c9","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.18.tgz","fileCount":9,"integrity":"sha512-jM8ErNEF3ct6Z91/ejlelgCYGug9lYIQNceAPEROaggQMpICDW9Lprxsda5po695LRZbwFaHNg9JKg6W2/+org==","signatures":[{"sig":"MEUCIETabs6h43+MsI93gLj/fXazBIaPHEaT87tY+486y2LhAiEA6NC0pP+orBcebGvfUn6UyqcOF6ZxQr2kJLSJGS4fD3g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23484},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"c26f36eb9c0a0c7206ad34dcafd09797d3f43e75","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.14.0","dependencies":{"@typeschema/zod":"^0.13.3","@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.2","@swc/core":"^1.5.29","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.7","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.18_1718312499278_0.6180571831946944","host":"s3://npm-registry-packages"}},"0.0.19":{"name":"next-safe-route","version":"0.0.19","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"author":{"url":"https://solomou.dev","name":"Richard Solomou","email":"richard@solomou.dev"},"license":"MIT","_id":"next-safe-route@0.0.19","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"dist":{"shasum":"f93526af3ed8f280fb0572dec69cd75debfc3a25","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.19.tgz","fileCount":9,"integrity":"sha512-en7rc0Y+1i1wWOsODxvuZk/APO4BEovH8AegiLGNpWG8n+Ms88sNGgkMv+SCvtkBfhKXt/ITrGIc+O2/+xWK+w==","signatures":[{"sig":"MEYCIQCziLugTuIU8qQkB/QsNemqHZ1LFSk4pgsG83pjbr4VSQIhAJlAWp/TKcNie8FGXD1UasnO74CtOLKMpOSKsA1HtsPt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32460},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"gitHead":"57ed66df98caa9557d5e5eda434bca4f026bbf1d","scripts":{"dev":"pnpm build --watch","lint":"tsc --noEmit && eslint .","test":"vitest run","build":"tsup","format":"prettier --write \"**/*.{ts,tsx,md}\"","prepare":"husky","release":"release-it","test:watch":"vitest","lint-staged":"lint-staged","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"release-it":{"git":{"commitMessage":"chore: release v${version}","requireBranch":"main"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]},"github":{"release":true,"releaseName":"${version}"}},"repository":{"url":"git+https://github.com/richardsolomou/next-safe-route.git","type":"git"},"_npmVersion":"10.7.0","description":"A safer way to define route handlers in Next.js","directories":{},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"_nodeVersion":"20.15.0","dependencies":{"@typeschema/zod":"^0.13.3","@typeschema/main":"^0.13.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.1.2","devDependencies":{"zod":"^3.23.8","tsup":"^8.1.0","husky":"^9.0.11","eslint":"^8.57.0","vitest":"^1.6.0","prettier":"^3.3.2","@swc/core":"^1.5.29","release-it":"^17.3.0","typescript":"^5.4.5","@types/node":"^20.14.2","lint-staged":"^15.2.7","@vitest/coverage-v8":"^1.6.0","@tronite/style-guide":"^0.0.13"},"_npmOperationalInternal":{"tmp":"tmp/next-safe-route_0.0.19_1720168877820_0.4609440187595386","host":"s3://npm-registry-packages"}},"0.0.20":{"name":"next-safe-route","version":"0.0.20","description":"A safer way to define route handlers in Next.js","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"homepage":"https://github.com/richardsolomou/next-safe-route#readme","bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"repository":{"type":"git","url":"git+https://github.com/richardsolomou/next-safe-route.git"},"license":"MIT","author":{"name":"Richard Solomou","email":"richard@solomou.dev","url":"https://solomou.dev"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","dev":"pnpm build --watch","format":"prettier --write \"**/*.{ts,tsx,md}\"","lint":"tsc --noEmit && eslint .","lint-staged":"lint-staged","prepare":"husky","release":"release-it","test":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest"},"lint-staged":{"**/*.{js,jsx,ts,tsx}":["eslint --fix","prettier --write"]},"devDependencies":{"@sinclair/typebox":"^0.33.7","@swc/core":"^1.5.29","@tronite/style-guide":"^0.0.13","@types/node":"^20.14.2","@vitest/coverage-v8":"^1.6.0","eslint":"^8.57.0","husky":"^9.0.11","lint-staged":"^15.2.7","prettier":"^3.3.2","release-it":"^17.3.0","tsup":"^8.1.0","typescript":"^5.4.5","valibot":"^0.39.0","vitest":"^1.6.0","yup":"^1.4.0","zod":"^3.23.8"},"packageManager":"pnpm@9.1.2","engines":{"node":">=18"},"publishConfig":{"access":"public"},"release-it":{"git":{"requireBranch":"main","commitMessage":"chore: release v${version}"},"github":{"release":true,"releaseName":"${version}"},"hooks":{"before:init":["git pull","pnpm lint","pnpm build"]}},"_id":"next-safe-route@0.0.20","gitHead":"bf3da774fa79335fb1a5605dfc15fb657b3b287d","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-FMfjBOIIJMLronMzrd1UJPBhte6oqAhmjcGhlz/52wAV8fkj92VnJdOXPqnHTh0T3UvTgyzOP4psxgSNnLmPvQ==","shasum":"e8e053b39005f8697ccc23f819ac0599b2de234d","tarball":"https://registry.npmjs.org/next-safe-route/-/next-safe-route-0.0.20.tgz","fileCount":9,"unpackedSize":43033,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID4ezMym4iXqwCCOHkfuCy+pDZCSsPXXm8EDT7B1sihiAiBqHJujp4mh0cy/tbCHmVaQLM8hkVNij7LwFHAmL0GQAA=="}]},"_npmUser":{"name":"richardsolomou","email":"rsolomou@gmail.com"},"directories":{},"maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-safe-route_0.0.20_1724673238344_0.25197394763691117"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-09T22:17:22.403Z","modified":"2024-08-26T11:53:58.665Z","0.0.2":"2024-06-09T22:17:23.007Z","0.0.3":"2024-06-09T22:27:16.324Z","0.0.4":"2024-06-09T22:28:00.738Z","0.0.5":"2024-06-09T22:41:37.732Z","0.0.6":"2024-06-09T22:46:24.505Z","0.0.7":"2024-06-09T22:49:21.569Z","0.0.8":"2024-06-09T22:57:58.049Z","0.0.9":"2024-06-09T23:05:06.548Z","0.0.10":"2024-06-09T23:09:35.494Z","0.0.11":"2024-06-09T23:13:00.750Z","0.0.12":"2024-06-09T23:17:59.617Z","0.0.13":"2024-06-09T23:26:42.014Z","0.0.14":"2024-06-10T00:02:46.460Z","0.0.15":"2024-06-10T08:05:29.769Z","0.0.16":"2024-06-10T08:36:52.800Z","0.0.17":"2024-06-10T18:01:49.583Z","0.0.18":"2024-06-13T21:01:39.413Z","0.0.19":"2024-07-05T08:41:17.949Z","0.0.20":"2024-08-26T11:53:58.508Z"},"bugs":{"url":"https://github.com/richardsolomou/next-safe-route/issues","email":"richard@solomou.dev"},"author":{"name":"Richard Solomou","email":"richard@solomou.dev","url":"https://solomou.dev"},"license":"MIT","homepage":"https://github.com/richardsolomou/next-safe-route#readme","keywords":["next","nextjs","next route","next safe route","nextjs safe","nextjs safe route","next api route","nextjs api route"],"repository":{"type":"git","url":"git+https://github.com/richardsolomou/next-safe-route.git"},"description":"A safer way to define route handlers in Next.js","maintainers":[{"name":"richardsolomou","email":"rsolomou@gmail.com"}],"readme":"<h1 align=\"center\">next-safe-route</h1>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/next-safe-route\"><img src=\"https://img.shields.io/npm/v/next-safe-route?style=for-the-badge&logo=npm\" /></a>\n  <a href=\"https://github.com/richardsolomou/next-safe-route/actions/workflows/test.yaml\"><img src=\"https://img.shields.io/github/actions/workflow/status/richardsolomou/next-safe-route/test.yaml?style=for-the-badge&logo=vitest\" /></a>\n  <a href=\"https://github.com/richardsolomou/next-safe-route/blob/main/LICENSE\"><img src=\"https://img.shields.io/npm/l/next-safe-route?style=for-the-badge\" /></a>\n</p>\n\n`next-safe-route` is a utility library for Next.js that provides type-safety and schema validation for [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers)/API Routes.\n\n## Features\n\n- **✅ Schema Validation:** Automatically validate request parameters, query strings, and body content with built-in error handling.\n- **🧷 Type-Safe:** Work with full TypeScript type safety for parameters, query strings, and body content.\n- **😌 Easy to Use:** Simple and intuitive API that makes defining route handlers a breeze.\n- **🔗 Extensible:** Compatible with any validation library supported by [TypeSchema](https://typeschema.com).\n- **🧪 Fully Tested:** Extensive test suite to ensure everything works reliably.\n\n## Installation\n\n```sh\nnpm install next-safe-route\n```\n\nThe library natively works with [zod](https://zod.dev) for schema validation, but you can use any other validation library that is supported by [TypeSchema](https://typeschema.com), as long as you install its respective adapter.\n\n## Usage\n\n```ts\n// app/api/hello/route.ts\nimport { createSafeRoute } from 'next-safe-route';\nimport { z } from 'zod';\n\nconst paramsSchema = z.object({\n  id: z.string(),\n});\n\nconst querySchema = z.object({\n  search: z.string().optional(),\n});\n\nconst bodySchema = z.object({\n  field: z.string(),\n});\n\nexport const GET = createSafeRoute()\n  .params(paramsSchema)\n  .query(querySchema)\n  .body(bodySchema)\n  .handler((request, context) => {\n    const { id } = context.params;\n    const { search } = context.query;\n    const { field } = context.body;\n\n    return Response.json({ id, search, field }), { status: 200 };\n  });\n```\n\nTo define a route handler in Next.js:\n\n1. Import `createSafeRoute` and your validation library (e.g., `zod`).\n2. Define validation schemas for params, query, and body as needed.\n3. Use `createSafeRoute()` to create a route handler, chaining `params`, `query`, and `body` methods.\n4. Implement your handler function, accessing validated and type-safe params, query, and body through `context`.\n\n## Tests\n\nTests are written using [Vitest](https://vitest.dev). To run the tests, use the following command:\n\n```sh\npnpm test\n```\n\n## Contributing\n\nContributions are welcome! For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}