{"_id":"@ahmafi/zod-prisma","_rev":"5-6034c13e00a992e5d0751a1e77e12127","name":"@ahmafi/zod-prisma","dist-tags":{"latest":"0.5.9"},"versions":{"0.5.5":{"name":"@ahmafi/zod-prisma","version":"0.5.5","description":"A Prisma generator that creates Zod schemas for all of your models","license":"MIT","author":{"name":"Amirhossein Mafi"},"homepage":"https://github.com/ahmafi/zod-prisma#readme","repository":{"type":"git","url":"git+https://github.com/ahmafi/zod-prisma.git"},"bugs":{"url":"https://github.com/ahmafi/zod-prisma/issues"},"main":"dist/index.js","module":"dist/zod-prisma.esm.js","typings":"dist/index.d.ts","bin":{"zod-prisma":"bin/cli.js"},"keywords":["zod","prisma","generator"],"scripts":{"build":"dts build --target node --format cjs --rollupTypes","lint":"tsc --noEmit && dts lint src --ignore-pattern src/test/functional","prepare":"husky install","prepublish":"dts build --target node --format cjs --rollupTypes","start":"dts watch","test":"dts test --maxWorkers=4 --verbose"},"prettier":{"printWidth":100,"semi":false,"singleQuote":true,"tabWidth":4,"trailingComma":"es5","useTabs":true},"eslintConfig":{"rules":{"react-hooks/rules-of-hooks":"off"}},"jest":{"testEnvironment":"node"},"dependencies":{"@prisma/generator-helper":"~3.8.1","parenthesis":"^3.1.8","ts-morph":"^13.0.2"},"devDependencies":{"@prisma/client":"~3.8.1","@prisma/sdk":"~3.7.0","@tsconfig/recommended":"^1.0.1","@types/fs-extra":"^9.0.13","dts-cli":"^1.1.5","execa":"^5.1.0","fast-glob":"^3.2.5","fs-extra":"^10.0.0","husky":"^7.0.4","jest-mock-extended":"^2.0.4","prisma":"^3.4.2","tslib":"^2.3.1","typescript":"^4.5.4","zod":"^3.11.6"},"peerDependencies":{"decimal.js":"^10.0.0","prisma":"^3.0.0","zod":"^3.0.0"},"peerDependenciesMeta":{"decimal.js":{"optional":true}},"engines":{"node":">=14"},"gitHead":"d820b8486d466eb2ddd198c992007b45b403b840","_id":"@ahmafi/zod-prisma@0.5.5","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-/BYFyVW8FvktGfpZsdG+BWsI0AsZs+l0ym29UtMJpIxqX7xXV4IpAY7iL9AGeJ1aFkXe9O9BtfzP9gO0kXGXPw==","shasum":"e29e606332b9134519326d4d2df85d5210f0f108","tarball":"https://registry.npmjs.org/@ahmafi/zod-prisma/-/zod-prisma-0.5.5.tgz","fileCount":10,"unpackedSize":86934,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFta6QuhECmUJ8JJIpAMfj1nZ/A7tZeSSIXpZc5iI2DMAiEApfDmrYAJfHW57gAW2h876PdRVPY/P65/CRW2U9PEXI0="}]},"_npmUser":{"name":"ahmafi","email":"amir77mafi@gmail.com"},"directories":{},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-prisma_0.5.5_1710956564762_0.46641214917367124"},"_hasShrinkwrap":false},"1.0.0":{"name":"@ahmafi/zod-prisma","version":"1.0.0","description":"My awesome typescript library","publishConfig":{"access":"public"},"prettier":"@egoist/prettier-config","eslintConfig":{"root":true,"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/recommended","plugin:prettier/recommended"],"rules":{"prettier/prettier":"warn","@typescript-eslint/no-unused-vars":["warn",{"argsIgnorePattern":"^_"}],"@typescript-eslint/no-non-null-assertion":"off"}},"bin":{"zod-prisma":"dist/cli.js"},"scripts":{"build-fast":"tsup-node src/cli.ts --format cjs,esm","build":"pnpm run build-fast","test":"vitest run","test:update":"UPDATE_EXPECTED=true vitest run test/functional/driver.test.ts >/dev/null 2>&1; echo Expected outputs updated.","prepublishOnly":"pnpm run build","prepare":"husky install","lint":"tsc --noEmit && eslint vitest.config.ts src/*.ts test/*.test.ts test/**/*.test.ts","lint:fix":"tsc --noEmit && eslint --fix vitest.config.ts src/*.ts test/*.test.ts test/**/*.test.ts"},"license":"MIT","devDependencies":{"@egoist/prettier-config":"1.0.0","@prisma/client":"^4.0.0","@prisma/internals":"^4.0.0","@typescript-eslint/eslint-plugin":"^5.30.0","@typescript-eslint/parser":"^5.30.0","decimal.js":"^10.3.1","eslint":"^8.18.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","execa":"6.1.0","expect-type":"^0.13.0","fast-glob":"3.2.11","fs-jetpack":"4.3.1","husky":"7.0.4","prettier":"2.7.1","prisma":"^3.15.2","tsup":"6.1.2","typescript":"4.7.4","vite":"^2.9.13","vite-plugin-eslint":"^1.6.1","vitest":"^0.16.0","zod":"^3.17.3"},"dependencies":{"@prisma/generator-helper":"^4.0.0","parenthesis":"3.1.8","ts-morph":"15.1.0"},"peerDependencies":{"decimal.js":"^10.0.0","prisma":"^3.0.0 || ^4.0.0","zod":"^3.0.0"},"peerDependenciesMeta":{"decimal.js":{"optional":true}},"gitHead":"a3d14f52aea136c4a9dad8115027daff0c2812a8","_id":"@ahmafi/zod-prisma@1.0.0","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-zKXFVDVtr4URu6mWJ2zPf2EZRIdCAu12kkhtFZk4PGeu3OA9pGiAk/fvcGX5XEW8BMUROSidumeljSMBDp37pQ==","shasum":"a7784c712d6015a8a1e488b862ff4bf8438ee7ed","tarball":"https://registry.npmjs.org/@ahmafi/zod-prisma/-/zod-prisma-1.0.0.tgz","fileCount":6,"unpackedSize":57100,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4aZ6HpmeaawK65ghmrWl4sXxviGmT2Rop8Qcr3BpVfAiA+6gGyj74MY7LmxoVF4Zeuv0/zHeN63I+yDnQem1Bjig=="}]},"_npmUser":{"name":"ahmafi","email":"amir77mafi@gmail.com"},"directories":{},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-prisma_1.0.0_1711796114131_0.7899368152077817"},"_hasShrinkwrap":false},"0.5.6":{"name":"@ahmafi/zod-prisma","version":"0.5.6","description":"A Prisma generator that creates Zod schemas for all of your models","license":"MIT","author":{"name":"Amirhossein Mafi"},"homepage":"https://github.com/ahmafi/zod-prisma#readme","repository":{"type":"git","url":"git+https://github.com/ahmafi/zod-prisma.git"},"bugs":{"url":"https://github.com/ahmafi/zod-prisma/issues"},"main":"dist/index.js","module":"dist/zod-prisma.esm.js","typings":"dist/index.d.ts","bin":{"zod-prisma":"bin/cli.js"},"keywords":["zod","prisma","generator"],"scripts":{"build":"dts build --target node --format cjs --rollupTypes","lint":"tsc --noEmit && dts lint src --ignore-pattern src/test/functional","prepare":"husky install","prepublish":"dts build --target node --format cjs --rollupTypes","start":"dts watch","test":"dts test --maxWorkers=4 --verbose"},"prettier":{"printWidth":100,"semi":false,"singleQuote":true,"tabWidth":4,"trailingComma":"es5","useTabs":true},"eslintConfig":{"rules":{"react-hooks/rules-of-hooks":"off"}},"jest":{"testEnvironment":"node"},"dependencies":{"@prisma/generator-helper":"~3.8.1","parenthesis":"^3.1.8","ts-morph":"^13.0.2"},"devDependencies":{"@prisma/client":"~3.8.1","@prisma/sdk":"~3.7.0","@tsconfig/recommended":"^1.0.1","@types/fs-extra":"^9.0.13","dts-cli":"^1.1.5","execa":"^5.1.0","fast-glob":"^3.2.5","fs-extra":"^10.0.0","husky":"^7.0.4","jest-mock-extended":"^2.0.4","prisma":"^3.4.2","tslib":"^2.3.1","typescript":"^4.5.4","zod":"^3.11.6"},"peerDependencies":{"decimal.js":"^10.0.0","prisma":"^3.0.0","zod":"^3.0.0"},"peerDependenciesMeta":{"decimal.js":{"optional":true}},"engines":{"node":">=14"},"gitHead":"795bc3130d421e315bc7522da82852c254e8890a","_id":"@ahmafi/zod-prisma@0.5.6","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-kp9KCAy448LWrUb6n0xbszdqR0zK5K69pE9eoEub5d+SWHDo5XgACqd0KUpk7ApXj5ZRgYEOwiyRirAwg4+3bQ==","shasum":"7b5159c8fb6bccc83bdcb874b4920a029cb9e20f","tarball":"https://registry.npmjs.org/@ahmafi/zod-prisma/-/zod-prisma-0.5.6.tgz","fileCount":10,"unpackedSize":86934,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBdvgSf4ULPm2mkq1UxdT+2O5D0qiY5/5hyAvOvNp26AiEA5OwekhCbfXS7jHFKJB/5Z8nR1KImsjGrHTz2CBq2A20="}]},"_npmUser":{"name":"ahmafi","email":"amir77mafi@gmail.com"},"directories":{},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-prisma_0.5.6_1711797048920_0.5320514599959136"},"_hasShrinkwrap":false},"0.5.7":{"name":"@ahmafi/zod-prisma","version":"0.5.7","description":"A Prisma generator that creates Zod schemas for all of your models","license":"MIT","author":{"name":"Amirhossein Mafi"},"homepage":"https://github.com/ahmafi/zod-prisma#readme","repository":{"type":"git","url":"git+https://github.com/ahmafi/zod-prisma.git"},"bugs":{"url":"https://github.com/ahmafi/zod-prisma/issues"},"main":"dist/index.js","module":"dist/zod-prisma.esm.js","typings":"dist/index.d.ts","bin":{"zod-prisma":"bin/cli.js"},"keywords":["zod","prisma","generator"],"scripts":{"build":"dts build --target node --format cjs --rollupTypes","lint":"tsc --noEmit && dts lint src --ignore-pattern src/test/functional","prepare":"husky install","prepublish":"dts build --target node --format cjs --rollupTypes","start":"dts watch","test":"dts test --maxWorkers=4 --verbose"},"prettier":{"printWidth":100,"semi":false,"singleQuote":true,"tabWidth":4,"trailingComma":"es5","useTabs":true},"eslintConfig":{"rules":{"react-hooks/rules-of-hooks":"off"}},"jest":{"testEnvironment":"node"},"dependencies":{"@prisma/generator-helper":"~3.8.1","parenthesis":"^3.1.8","ts-morph":"^13.0.2"},"devDependencies":{"@prisma/client":"~3.8.1","@prisma/sdk":"~3.7.0","@tsconfig/recommended":"^1.0.1","@types/fs-extra":"^9.0.13","dts-cli":"^1.1.5","execa":"^5.1.0","fast-glob":"^3.2.5","fs-extra":"^10.0.0","husky":"^7.0.4","jest-mock-extended":"^2.0.4","prisma":"^3.4.2","tslib":"^2.3.1","typescript":"^4.5.4","zod":"^3.11.6"},"peerDependencies":{"decimal.js":"^10.0.0","prisma":"^3.0.0","zod":"^3.0.0"},"peerDependenciesMeta":{"decimal.js":{"optional":true}},"engines":{"node":">=14"},"gitHead":"795bc3130d421e315bc7522da82852c254e8890a","_id":"@ahmafi/zod-prisma@0.5.7","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-/QM3wxe86wafd+PrUDit5sTUYNU4FL5EE1pnH75gJpUSWgGOsJHKk9QCtJyTY8QqAW4ghTP/DxQXtPsGVMFRlQ==","shasum":"0b919257c8b788f998a176bc838f91436b90a686","tarball":"https://registry.npmjs.org/@ahmafi/zod-prisma/-/zod-prisma-0.5.7.tgz","fileCount":10,"unpackedSize":87557,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZYvJPA+WLXdOoNnG1nDBmRcSFLezDdVB93zfWEZFtLwIhAOdx+kWTVaHIIsFhqiFC0orEEsNIkr249Sikenr+x04x"}]},"_npmUser":{"name":"ahmafi","email":"amir77mafi@gmail.com"},"directories":{},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-prisma_0.5.7_1711797303509_0.03679688065497677"},"_hasShrinkwrap":false},"0.5.8":{"name":"@ahmafi/zod-prisma","version":"0.5.8","description":"A Prisma generator that creates Zod schemas for all of your models","license":"MIT","author":{"name":"Amirhossein Mafi"},"homepage":"https://github.com/ahmafi/zod-prisma#readme","repository":{"type":"git","url":"git+https://github.com/ahmafi/zod-prisma.git"},"bugs":{"url":"https://github.com/ahmafi/zod-prisma/issues"},"main":"dist/index.js","module":"dist/zod-prisma.esm.js","typings":"dist/index.d.ts","bin":{"zod-prisma":"bin/cli.js"},"keywords":["zod","prisma","generator"],"scripts":{"build":"dts build --target node --format cjs --rollupTypes","lint":"tsc --noEmit && dts lint src --ignore-pattern src/test/functional","prepare":"husky install","prepublish":"dts build --target node --format cjs --rollupTypes","start":"dts watch","test":"dts test --maxWorkers=4 --verbose"},"prettier":{"printWidth":100,"semi":false,"singleQuote":true,"tabWidth":4,"trailingComma":"es5","useTabs":true},"eslintConfig":{"rules":{"react-hooks/rules-of-hooks":"off"}},"jest":{"testEnvironment":"node"},"dependencies":{"@prisma/generator-helper":"~3.8.1","parenthesis":"^3.1.8","ts-morph":"^13.0.2"},"devDependencies":{"@prisma/client":"~3.8.1","@prisma/sdk":"~3.7.0","@tsconfig/recommended":"^1.0.1","@types/fs-extra":"^9.0.13","dts-cli":"^1.1.5","execa":"^5.1.0","fast-glob":"^3.2.5","fs-extra":"^10.0.0","husky":"^7.0.4","jest-mock-extended":"^2.0.4","prisma":"^3.4.2","tslib":"^2.3.1","typescript":"^4.5.4","zod":"^3.11.6"},"peerDependencies":{"decimal.js":"^10.0.0","prisma":"^3.0.0","zod":"^3.0.0"},"peerDependenciesMeta":{"decimal.js":{"optional":true}},"engines":{"node":">=14"},"gitHead":"795bc3130d421e315bc7522da82852c254e8890a","_id":"@ahmafi/zod-prisma@0.5.8","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-5VJYnWSfyxZ6/nsAQGI/4QXrPuH2i5sYbSyx9yeS6anLbs//zHTL0EhY6rY5l00YWDWZwmg7BsTkRlX/wZs9Ng==","shasum":"d0d7dea10f69a4fc7794b02d43989948fca9b9e9","tarball":"https://registry.npmjs.org/@ahmafi/zod-prisma/-/zod-prisma-0.5.8.tgz","fileCount":10,"unpackedSize":86365,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnwu9bS2s1aICwAG8OqMxxrD0VKK89RIjaalb5thC7MgIgF953WrzF/Au+xM+0dhuimUf7e+ntAqdds8HOymczFnU="}]},"_npmUser":{"name":"ahmafi","email":"amir77mafi@gmail.com"},"directories":{},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-prisma_0.5.8_1711798196449_0.920585879330811"},"_hasShrinkwrap":false},"0.5.9":{"name":"@ahmafi/zod-prisma","version":"0.5.9","description":"A Prisma generator that creates Zod schemas for all of your models","license":"MIT","author":{"name":"Amirhossein Mafi"},"homepage":"https://github.com/ahmafi/zod-prisma#readme","repository":{"type":"git","url":"git+https://github.com/ahmafi/zod-prisma.git"},"bugs":{"url":"https://github.com/ahmafi/zod-prisma/issues"},"main":"dist/index.js","module":"dist/zod-prisma.esm.js","typings":"dist/index.d.ts","bin":{"zod-prisma":"bin/cli.js"},"keywords":["zod","prisma","generator"],"scripts":{"build":"dts build --target node --format cjs --rollupTypes","lint":"tsc --noEmit && dts lint src --ignore-pattern src/test/functional","prepare":"husky install","prepublish":"dts build --target node --format cjs --rollupTypes","start":"dts watch","test":"dts test --maxWorkers=4 --verbose"},"prettier":{"printWidth":100,"semi":false,"singleQuote":true,"tabWidth":4,"trailingComma":"es5","useTabs":true},"eslintConfig":{"rules":{"react-hooks/rules-of-hooks":"off"}},"jest":{"testEnvironment":"node"},"dependencies":{"@prisma/generator-helper":"~3.8.1","parenthesis":"^3.1.8","ts-morph":"^13.0.2"},"devDependencies":{"@prisma/client":"~3.8.1","@prisma/sdk":"~3.7.0","@tsconfig/recommended":"^1.0.1","@types/fs-extra":"^9.0.13","dts-cli":"^1.1.5","execa":"^5.1.0","fast-glob":"^3.2.5","fs-extra":"^10.0.0","husky":"^7.0.4","jest-mock-extended":"^2.0.4","prisma":"^3.4.2","tslib":"^2.3.1","typescript":"^4.5.4","zod":"^3.11.6"},"peerDependencies":{"decimal.js":"^10.0.0","prisma":"^3.0.0","zod":"^3.0.0"},"peerDependenciesMeta":{"decimal.js":{"optional":true}},"engines":{"node":">=14"},"gitHead":"795bc3130d421e315bc7522da82852c254e8890a","_id":"@ahmafi/zod-prisma@0.5.9","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Y9Fl4tWJ9Nt2xoXt7i0/M5CYYevKfPmD1AjFaLaW2Tcu4UNK48S8RUuJ6G+nsVeowaI1ZDA+P877lrJuQY+hvQ==","shasum":"ca82932eba002c9297fc600b279f4342d5042088","tarball":"https://registry.npmjs.org/@ahmafi/zod-prisma/-/zod-prisma-0.5.9.tgz","fileCount":10,"unpackedSize":86405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUMSJ+MyyyZXp6jfdzHFvFNokewZNQDkU9LphQXMIHgAiEA2h/8JMmra5xQGSdHEXCjQYTVMi1Hl3CNDkzipl8asoM="}]},"_npmUser":{"name":"ahmafi","email":"amir77mafi@gmail.com"},"directories":{},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-prisma_0.5.9_1711812873451_0.7336264961088159"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-20T17:42:44.671Z","0.5.5":"2024-03-20T17:42:44.933Z","modified":"2024-03-30T15:34:33.800Z","1.0.0":"2024-03-30T10:55:14.383Z","0.5.6":"2024-03-30T11:10:49.092Z","0.5.7":"2024-03-30T11:15:03.751Z","0.5.8":"2024-03-30T11:29:56.654Z","0.5.9":"2024-03-30T15:34:33.622Z"},"maintainers":[{"name":"ahmafi","email":"amir77mafi@gmail.com"}],"description":"A Prisma generator that creates Zod schemas for all of your models","license":"MIT","readme":"<!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Thanks again! Now go create something AMAZING! :D\n***\n***\n***\n*** To avoid retyping too much info. Do a search and replace for the following:\n*** CarterGrimmeisen, zod-prisma, twitter_handle, Carter.Grimmeisen@uah.edu, Zod Prisma, A custom prisma generator that creates Zod schemas from your Prisma model.\n-->\n\n<!-- PROJECT SHIELDS -->\n<!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n-->\n\n[![NPM][npm-shield]][npm-url]\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n<!-- PROJECT LOGO -->\n<br />\n<p align=\"center\">\n  <a href=\"https://github.com/CarterGrimmeisen/zod-prisma\">\n    <img src=\"https://raw.githubusercontent.com/CarterGrimmeisen/zod-prisma/main/images/zod-prisma.svg\" alt=\"Logo\" width=\"120\" height=\"120\">\n  </a>\n  <h3 align=\"center\">Zod Prisma</h3>\n  <p align=\"center\">\n    A custom prisma generator that creates Zod schemas from your Prisma model.\n    <br />\n    <a href=\"https://github.com/CarterGrimmeisen/zod-prisma\"><strong>Explore the docs »</strong></a>\n    <br />\n    <br />\n    <a href=\"https://github.com/CarterGrimmeisen/zod-prisma/blob/main/src/test/functional\">View Demo</a>\n    ·\n    <a href=\"https://github.com/CarterGrimmeisen/zod-prisma/issues\">Report Bug</a>\n    ·\n    <a href=\"https://github.com/CarterGrimmeisen/zod-prisma/issues\">Request Feature</a>\n  </p>\n</p>\n\n<!-- TABLE OF CONTENTS -->\n<details open=\"open\">\n  <summary><h2 style=\"display: inline-block\">Table of Contents</h2></summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n      <ul>\n        <li><a href=\"#built-with\">Built With</a></li>\n      </ul>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#prerequisites\">Prerequisites</a></li>\n        <li><a href=\"#installation\">Installation</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#usage\">Usage</a>\n      <ul>\n      <li><a href=\"#jsdoc-generation\">JSDoc Generation</a></li>\n      <li><a href=\"#extending-zod-fields\">Extending Zod Fields</a></li>\n      <li>\n        <a href=\"#importing-helpers\">Importing Helpers</a>\n        <ul>\n        <li><a href=\"#custom-zod-schema\">Custom Zod Schemas</a></li>\n        </ul>\n      </li>\n      <li><a href=\"#json-fields\">JSON Fields</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#examples\">Examples</a></li>\n    <li><a href=\"#roadmap\">Roadmap</a></li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <li><a href=\"#license\">License</a></li>\n    <li><a href=\"#contact\">Contact</a></li>\n  </ol>\n</details>\n\n<!-- ABOUT THE PROJECT -->\n\n## About The Project\n\nI got tired of having to manually create Zod schemas for my Prisma models and of updating them everytime I made schema changes.\nThis provides a way of automatically generating them with your prisma\n\n<!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) -->\n\n### Built With\n\n-   [dts-cli](https://github.com/weiran-zsd/dts-cli)\n-   [Zod](https://github.com/colinhacks/zod)\n-   [Based on this gist](https://gist.github.com/deckchairlabs/8a11c33311c01273deec7e739417dbc9)\n\n<!-- GETTING STARTED -->\n\n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n### Prerequisites\n\nThis project utilizes yarn and if you plan on contributing, you should too.\n\n```sh\nnpm install -g yarn\n```\n\n### Installation\n\n0.  **Ensure your tsconfig.json enables the compiler's strict mode.**\n    **Zod requires it and so do we, you will experience TS errors without strict mode enabled**\n\n1.  Add zod-prisma as a dev dependency\n\n    ```sh\n    yarn add -D zod-prisma\n    ```\n\n2.  Add the zod-prisma generator to your schema.prisma\n\n    ```prisma\n    generator zod {\n      provider                 = \"zod-prisma\"\n      output                   = \"./zod\" // (default) the directory where generated zod schemas will be saved\n\n      relationModel            = true // (default) Create and export both plain and related models.\n      // relationModel         = \"default\" // Do not export model without relations.\n      // relationModel         = false // Do not generate related model\n\n      modelCase                = \"PascalCase\" // (default) Output models using pascal case (ex. UserModel, PostModel)\n      // modelCase             = \"camelCase\" // Output models using camel case (ex. userModel, postModel)\n\n      modelSuffix              = \"Model\" // (default) Suffix to apply to your prisma models when naming Zod schemas\n\n      // useDecimalJs          = false // (default) represent the prisma Decimal type using as a JS number\n      useDecimalJs             = true // represent the prisma Decimal type using Decimal.js (as Prisma does)\n\n      imports                  = null // (default) will import the referenced file in generated schemas to be used via imports.someExportedVariable\n\n      // https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values\n      prismaJsonNullability    = true // (default) uses prisma's scheme for JSON field nullability\n      // prismaJsonNullability = false // allows null assignment to optional JSON fields\n    }\n    ```\n\n3.  Run `npx prisma generate` or `yarn prisma generate` to generate your zod schemas\n4.  Import the generated schemas form your selected output location\n\n<!-- USAGE EXAMPLES -->\n\n## Usage\n\n### JSDoc Generation\n\n[Rich-comments](https://www.prisma.io/docs/concepts/components/prisma-schema#comments)\nin the Prisma schema will be transformed into JSDoc for the associated fields:\n\n> _Note: make sure to use a triple-slash. Double-slash comments won't be processed._\n\n```prisma\nmodel Post {\n  /// The unique identifier for the post\n  /// @default {Generated by database}\n  id String @id @default(uuid())\n\n  /// A brief title that describes the contents of the post\n  title String\n\n  /// The actual contents of the post.\n  contents String\n}\n```\n\nGenerated code:\n\n```ts\nexport const PostModel = z.object({\n\t/**\n\t * The unique identifier for the post\n\t * @default {Generated by database}\n\t */\n\tid: z.string().uuid(),\n\t/**\n\t * A brief title that describes the contents of the post\n\t */\n\ttitle: z.string(),\n\t/**\n\t * The actual contents of the post.\n\t */\n\tcontents: z.string(),\n})\n```\n\n### Extending Zod Fields\n\nYou can also use the `@zod` keyword in rich-comments in the Prisma schema\nto extend your Zod schema fields:\n\n```prisma\nmodel Post {\n  id String @id @default(uuid()) /// @zod.uuid()\n\n  /// @zod.max(255, { message: \"The title must be shorter than 256 characters\" })\n  title String\n\n  contents String /// @zod.max(10240)\n}\n```\n\nGenerated code:\n\n```ts\nexport const PostModel = z.object({\n\tid: z.string().uuid(),\n\ttitle: z.string().max(255, { message: 'The title must be shorter than 256 characters' }),\n\tcontents: z.string().max(10240),\n})\n```\n\n### Importing Helpers\n\nSometimes its useful to define a custom Zod preprocessor or transformer for your data.\nzod-prisma enables you to reuse these by importing them via a config options. For example:\n\n```prisma\ngenerator zod {\n  provider      = \"zod-prisma\"\n  output        = \"./zod\"\n  imports \t\t  = \"../src/zod-schemas\"\n}\n\nmodel User {\n  username\tString /// @zod.refine(imports.isValidUsername)\n}\n```\n\nThe referenced file can then be used by simply referring to exported members via `imports.whateverExport`.\nThe generated zod schema files will now include a namespaced import like the following.\n\n```typescript\nimport * as imports from '../../src/zod-schemas'\n```\n\n#### Custom Zod Schema\n\nIn conjunction with this import option, you may want to utilize an entirely custom zod schema for a field.\nThis can be accomplished by using the special comment directive `@zod.custom()`.\nBy specifying the custom schema within the parentheses you can replace the autogenerated type that would normally be assigned to the field.\n\n> For instance if you wanted to use `z.preprocess`\n\n### JSON Fields\n\nJSON fields in Prisma disallow null values. This is to disambiguate between setting a field's value to NULL in the database and having\na value of null stored in the JSON. In accordance with this zod-prisma will default to disallowing null values, even if your JSON field is optional.\n\nIf you would like to revert this behavior and allow null assignment to JSON fields,\nyou can set `prismaJsonNullability` to `false` in the generator options.\n\n## Examples\n\n<!-- Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources. -->\n\n_For examples, please refer to the [Examples Directory](https://github.com/CarterGrimmeisen/zod-prisma/blob/main/examples) or the [Functional Tests](https://github.com/CarterGrimmeisen/zod-prisma/blob/main/src/test/functional)_\n\n<!-- ROADMAP -->\n\n## Roadmap\n\nSee the [open issues](https://github.com/CarterGrimmeisen/zod-prisma/issues) for a list of proposed features (and known issues).\n\n<!-- CONTRIBUTING -->\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n<!-- LICENSE -->\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n<!-- CONTACT -->\n\n## Contact\n\nCarter Grimmeisen - Carter.Grimmeisen@uah.edu\n\nProject Link: [https://github.com/CarterGrimmeisen/zod-prisma](https://github.com/CarterGrimmeisen/zod-prisma)\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n\n[npm-shield]: https://img.shields.io/npm/v/zod-prisma?style=for-the-badge\n[npm-url]: https://www.npmjs.com/package/zod-prisma\n[contributors-shield]: https://img.shields.io/github/contributors/CarterGrimmeisen/zod-prisma.svg?style=for-the-badge\n[contributors-url]: https://github.com/CarterGrimmeisen/zod-prisma/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/CarterGrimmeisen/zod-prisma.svg?style=for-the-badge\n[forks-url]: https://github.com/CarterGrimmeisen/zod-prisma/network/members\n[stars-shield]: https://img.shields.io/github/stars/CarterGrimmeisen/zod-prisma.svg?style=for-the-badge\n[stars-url]: https://github.com/CarterGrimmeisen/zod-prisma/stargazers\n[issues-shield]: https://img.shields.io/github/issues/CarterGrimmeisen/zod-prisma.svg?style=for-the-badge\n[issues-url]: https://github.com/CarterGrimmeisen/zod-prisma/issues\n[license-shield]: https://img.shields.io/github/license/CarterGrimmeisen/zod-prisma.svg?style=for-the-badge\n[license-url]: https://github.com/CarterGrimmeisen/zod-prisma/blob/main/LICENSE\n","readmeFilename":"README.md","homepage":"https://github.com/ahmafi/zod-prisma#readme","keywords":["zod","prisma","generator"],"repository":{"type":"git","url":"git+https://github.com/ahmafi/zod-prisma.git"},"author":{"name":"Amirhossein Mafi"},"bugs":{"url":"https://github.com/ahmafi/zod-prisma/issues"}}