{"_id":"@dudousxd/nestjs-codegen-zod","_rev":"4-ac15b8cfcc5ad861bfd6d601f231e491","name":"@dudousxd/nestjs-codegen-zod","dist-tags":{"latest":"0.5.1"},"versions":{"0.3.0":{"name":"@dudousxd/nestjs-codegen-zod","version":"0.3.0","author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-codegen-zod@0.3.0","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-codegen#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-codegen/issues"},"dist":{"shasum":"e59e2da54f4b5d05fc932e09cef04d65ef3d52a0","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-codegen-zod/-/nestjs-codegen-zod-0.3.0.tgz","fileCount":10,"integrity":"sha512-Yvg5v2OnGd9veWq3HCAl2n3L1NVID3/Y4ZGoEw+bFWA0MtCbm0Jr5EEqrmSBby4GADgdhkZ/UBPmxntTNg7bJw==","signatures":[{"sig":"MEUCIHGXAaN/FmeuL3nMTQcgzf+3Tb7gPgXFC0XxWlUVQhwsAiEA7kj4FahohjNM66e9xcbvJfW5KfGRlhCF0EoXSnM1H/k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-codegen-zod@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":25674},"main":"./dist/index.cjs","type":"module","_from":"file:dudousxd-nestjs-codegen-zod-0.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/66b2c6e91cfa4466b9304aad7d28240d/dudousxd-nestjs-codegen-zod-0.3.0.tgz","_integrity":"sha512-Yvg5v2OnGd9veWq3HCAl2n3L1NVID3/Y4ZGoEw+bFWA0MtCbm0Jr5EEqrmSBby4GADgdhkZ/UBPmxntTNg7bJw==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-codegen.git","type":"git","directory":"packages/zod"},"_npmVersion":"10.9.8","description":"Zod validation adapter for @dudousxd/nestjs-codegen — renders the schema IR to zod source.","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.8","ts-morph":"28.0.0","typescript":"5.9.3","@types/node":"20.19.42","@dudousxd/nestjs-codegen":"0.3.0"},"peerDependencies":{"@dudousxd/nestjs-codegen":"^0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-codegen-zod_0.3.0_1781171668977_0.9964181294578776","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@dudousxd/nestjs-codegen-zod","version":"0.4.0","author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-codegen-zod@0.4.0","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-codegen#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-codegen/issues"},"dist":{"shasum":"8c66fc5771a646939986399f5b43d7835dc102da","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-codegen-zod/-/nestjs-codegen-zod-0.4.0.tgz","fileCount":10,"integrity":"sha512-AIF6LQroQELXN1rJEhInkiPF2b/od/jEAs28ozMczKfnD4m/3vZQvAV7p8jppD5d8ac24jFL70tOD+SOqaUyUA==","signatures":[{"sig":"MEUCIQDVrb5n8ghMKmNAQAFG6dkKh+AM+LP/ACL/o7q1Klfc1gIgGJMy3oxt8L2VqPl3IMi73MHJ+QvM0fjy9d3hwhO0/6g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-codegen-zod@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31001},"main":"./dist/index.cjs","type":"module","_from":"file:dudousxd-nestjs-codegen-zod-0.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/99bdc0fe3ff5fab881b1c025e5a9163e/dudousxd-nestjs-codegen-zod-0.4.0.tgz","_integrity":"sha512-AIF6LQroQELXN1rJEhInkiPF2b/od/jEAs28ozMczKfnD4m/3vZQvAV7p8jppD5d8ac24jFL70tOD+SOqaUyUA==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-codegen.git","type":"git","directory":"packages/zod"},"_npmVersion":"10.9.8","description":"Zod validation adapter for @dudousxd/nestjs-codegen — renders the schema IR to zod source.","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.8","ts-morph":"28.0.0","typescript":"5.9.3","@types/node":"20.19.42","@dudousxd/nestjs-codegen":"0.4.0"},"peerDependencies":{"@dudousxd/nestjs-codegen":">=0.3.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-codegen-zod_0.4.0_1781234069727_0.21240860406165107","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@dudousxd/nestjs-codegen-zod","version":"0.5.0","author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","_id":"@dudousxd/nestjs-codegen-zod@0.5.0","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"homepage":"https://github.com/DavideCarvalho/nestjs-codegen#readme","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-codegen/issues"},"dist":{"shasum":"5627ca09eb6eb4a458a74c5f1443fc4435a85b75","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-codegen-zod/-/nestjs-codegen-zod-0.5.0.tgz","fileCount":10,"integrity":"sha512-UDKrW02DxgoZjdKiIAx21Cw0hrL8Wyi+gzuk9UUz+qbBX0fnjLrqe1llNeMzjI0IDrU/dt1Ci/TSw9/Swk7ybA==","signatures":[{"sig":"MEYCIQC+1Bbkd58HRD0bGemAlZy39fM9ZqV8HwyhiF8wBNMlLgIhAJiWrBKVTb2+YVGTrmgtdtmfhocmf2tof4E9GTX5JICQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-codegen-zod@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35163},"main":"./dist/index.cjs","type":"module","_from":"file:dudousxd-nestjs-codegen-zod-0.5.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"_resolved":"/tmp/989c63e7db6d7414b3df85f8f308d496/dudousxd-nestjs-codegen-zod-0.5.0.tgz","_integrity":"sha512-UDKrW02DxgoZjdKiIAx21Cw0hrL8Wyi+gzuk9UUz+qbBX0fnjLrqe1llNeMzjI0IDrU/dt1Ci/TSw9/Swk7ybA==","repository":{"url":"git+https://github.com/DavideCarvalho/nestjs-codegen.git","type":"git","directory":"packages/zod"},"_npmVersion":"10.9.8","description":"Zod validation adapter for @dudousxd/nestjs-codegen — renders the schema IR to zod source.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.8","ts-morph":"28.0.0","typescript":"5.9.3","@types/node":"20.19.42","@dudousxd/nestjs-codegen":"0.5.0"},"peerDependencies":{"@dudousxd/nestjs-codegen":">=0.3.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/nestjs-codegen-zod_0.5.0_1781797236395_0.1325464559610725","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@dudousxd/nestjs-codegen-zod","version":"0.5.1","repository":{"type":"git","url":"git+https://github.com/DavideCarvalho/nestjs-codegen.git","directory":"packages/zod"},"description":"Zod validation adapter for @dudousxd/nestjs-codegen — renders the schema IR to zod source.","license":"MIT","author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"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"}}},"sideEffects":false,"peerDependencies":{"@dudousxd/nestjs-codegen":">=0.3.0 <1"},"devDependencies":{"@types/node":"20.19.42","ts-morph":"28.0.0","typescript":"5.9.3","vitest":"4.1.8","@dudousxd/nestjs-codegen":"0.5.2"},"engines":{"node":">=20"},"scripts":{"build":"tsup","test":"vitest run","typecheck":"tsc --noEmit -p tsconfig.json"},"_id":"@dudousxd/nestjs-codegen-zod@0.5.1","bugs":{"url":"https://github.com/DavideCarvalho/nestjs-codegen/issues"},"homepage":"https://github.com/DavideCarvalho/nestjs-codegen#readme","_integrity":"sha512-WELbiHRwAMCSQCg2RLWGx9vDt7GOyd7xYewuiwq+Pk+AO7PlPFh9o+L2AE5liFD9b5fBfNB5ujOwTUVEgT+w/g==","_resolved":"/tmp/e47a39f0612ae9e1ec1698187963ed89/dudousxd-nestjs-codegen-zod-0.5.1.tgz","_from":"file:dudousxd-nestjs-codegen-zod-0.5.1.tgz","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-WELbiHRwAMCSQCg2RLWGx9vDt7GOyd7xYewuiwq+Pk+AO7PlPFh9o+L2AE5liFD9b5fBfNB5ujOwTUVEgT+w/g==","shasum":"e272bf201f173b9b31521503b95ee5cba38cd881","tarball":"https://registry.npmjs.org/@dudousxd/nestjs-codegen-zod/-/nestjs-codegen-zod-0.5.1.tgz","fileCount":10,"unpackedSize":29899,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dudousxd%2fnestjs-codegen-zod@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCvv22pe5qYTp5gisP2l82LQoFlhbJ1DtFm1ulV9xmyewIgF4BDddLlrm2hhRnpGMuDm24eDOTInuf8NXjJ/1BYA/A="}]},"_npmUser":{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"},"directories":{},"maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nestjs-codegen-zod_0.5.1_1781898514497_0.5948454179993374"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-11T09:54:28.842Z","modified":"2026-06-19T19:48:34.937Z","0.3.0":"2026-06-11T09:54:29.106Z","0.4.0":"2026-06-12T03:14:29.892Z","0.5.0":"2026-06-18T15:40:36.543Z","0.5.1":"2026-06-19T19:48:34.633Z"},"bugs":{"url":"https://github.com/DavideCarvalho/nestjs-codegen/issues"},"author":{"name":"Davi Carvalho","email":"davi@goflip.ai"},"license":"MIT","homepage":"https://github.com/DavideCarvalho/nestjs-codegen#readme","repository":{"type":"git","url":"git+https://github.com/DavideCarvalho/nestjs-codegen.git","directory":"packages/zod"},"description":"Zod validation adapter for @dudousxd/nestjs-codegen — renders the schema IR to zod source.","maintainers":[{"name":"dudousxd","email":"davi_carvalho96@hotmail.com"}],"readme":"# @dudousxd/nestjs-codegen-zod\n\n> Zod validation adapter for [`@dudousxd/nestjs-codegen`](https://www.npmjs.com/package/@dudousxd/nestjs-codegen).\n\n![npm](https://img.shields.io/npm/v/@dudousxd/nestjs-codegen-zod)\n\n`nestjs-codegen` translates your `@Body()`/`@Query()` DTOs and `defineContract` schemas\ninto one neutral schema IR (`SchemaNode`), then renders that IR with a **validation\nadapter**. This package is the **zod** adapter: it renders the IR into zod source in the\ngenerated `forms.ts`.\n\nzod is the default validation adapter — reach for this package when you want to pin the\nadapter explicitly, or when a future core release no longer bundles it by default.\n\n## Install\n\n```bash\npnpm add -D @dudousxd/nestjs-codegen-zod\n```\n\n`zod` itself is the runtime dependency your generated `forms.ts` imports from\n(`import { z } from 'zod'`), so install it in your app too:\n\n```bash\npnpm add zod\n```\n\n## Setup\n\nzod is used by default. To pin the adapter explicitly, pass `zodAdapter` to the codegen\nconfig:\n\n```ts\nimport { defineConfig } from '@dudousxd/nestjs-codegen';\nimport { zodAdapter } from '@dudousxd/nestjs-codegen-zod';\n\nexport default defineConfig({\n  validation: zodAdapter,\n});\n```\n\nGiven a DTO like:\n\n```ts\nclass CreateUserDto {\n  @IsEmail() email!: string;\n  @MinLength(8) password!: string;\n}\n```\n\nthe adapter renders `forms.ts` in zod's idiom:\n\n```ts\nimport { z } from 'zod';\n\nexport const CreateBodySchema = z.object({\n  email: z.string().email(),\n  password: z.string().min(8),\n});\nexport type CreateBody = z.infer<typeof CreateBodySchema>;\n```\n\n## How it fits\n\nThe codegen builds **one** neutral schema IR from your DTOs and contracts. A validation\nadapter renders that IR into a concrete library's source:\n\n- **zod** — this package, the default (`validation: 'zod'`)\n- **valibot** — [`@dudousxd/nestjs-codegen-valibot`](https://www.npmjs.com/package/@dudousxd/nestjs-codegen-valibot) (`validation: valibotAdapter`)\n- **arktype** — [`@dudousxd/nestjs-codegen-arktype`](https://www.npmjs.com/package/@dudousxd/nestjs-codegen-arktype) (`validation: arktypeAdapter`)\n\nPick exactly one — it decides which library your generated `forms.ts` imports and\nvalidates with.\n\n## Documentation\n\n- [Pluggable Validation docs](https://github.com/DavideCarvalho/nestjs-codegen/blob/main/apps/docs/content/docs/validation.mdx)\n- [Repository](https://github.com/DavideCarvalho/nestjs-codegen)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}