{"_id":"@caretcms/zod","_rev":"5-8e46f55c69b846d61a33f6cfa6527bae","name":"@caretcms/zod","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@caretcms/zod","version":"0.1.0","keywords":["astro","cms","caret","zod","json-schema","content-collections"],"license":"MIT","_id":"@caretcms/zod@0.1.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/zod#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"dist":{"shasum":"f09864c4a18d2561bc6aa9b0a29e35f260e3e5a5","tarball":"https://registry.npmjs.org/@caretcms/zod/-/zod-0.1.0.tgz","fileCount":6,"integrity":"sha512-4J7EVOkuSrItzhdl0vIpPau/PsV7ASXrXegoM3ZAYLJrDQTFZdZCSDcMj/j683hCqCHDh687pfMbVHXeLQf5ZQ==","signatures":[{"sig":"MEUCIFtqgr+Nkl8KCfTN9sdlRZZ/Xth//HG+6gvAiMgNItL2AiEAjI9KKt6KtvPCZxBC2QtF7k1Ml1As3WbZ1Xvv+3FaS6o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11131},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"14a7b1c33f6e7746d72c2765cfa1e738c884d177","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/zod"},"_npmVersion":"11.11.0","description":"Derive CaretCMS Studio schemas from your Zod content-collection schemas — single source of truth.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","typescript":"6.0.3","@types/node":"25.6.0"},"peerDependencies":{"zod":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/zod_0.1.0_1781230338577_0.23859326325760755","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@caretcms/zod","version":"0.2.0","keywords":["astro","cms","caret","zod","json-schema","content-collections"],"license":"MIT","_id":"@caretcms/zod@0.2.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/zod#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"dist":{"shasum":"dbf23ad0db8f4da85d192f6cc4685cb8f5aff868","tarball":"https://registry.npmjs.org/@caretcms/zod/-/zod-0.2.0.tgz","fileCount":6,"integrity":"sha512-jCdOZvppWXidwz7vC0A1Pgieukhmc5MmPPtWXL9PBnDoUDCp3nPz+GNT61RJxz6/pyAI1ahsqXCBXo/NZgruhA==","signatures":[{"sig":"MEQCIHB+74xmNGK+V/aXXCt//wgzReUzZy2c/t9oh+L7DB6vAiAzi89w+TDSa3TwkzxlHtYI1Uq/JuZUEKrSKN862SaoeQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11165},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"beba21e3c4b85faff5639c50625948bc987837ac","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/zod"},"_npmVersion":"11.16.0","description":"Derive CaretCMS Studio schemas from your Zod content-collection schemas — single source of truth.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","typescript":"6.0.3","@types/node":"25.6.0"},"peerDependencies":{"zod":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/zod_0.2.0_1785859368505_0.9440216526592151","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@caretcms/zod","version":"0.3.0","keywords":["astro","cms","caret","zod","json-schema","content-collections"],"license":"MIT","_id":"@caretcms/zod@0.3.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/zod#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"dist":{"shasum":"e484ed71817df5a3f1065abd45d1a4ef1d6bb186","tarball":"https://registry.npmjs.org/@caretcms/zod/-/zod-0.3.0.tgz","fileCount":7,"integrity":"sha512-udc89yzyIE8nzKwBM0ga+OYX6FwMYVb+QjGStsIfJi+kahufN+wLyUpCedB/uIdTM0cFw4XzShfHAwQTSvpBsA==","signatures":[{"sig":"MEYCIQDXmRsPCB+p8x0hBCcMgztE/U88f0J70BYR9182bB/1gAIhANJ1tY2A3fcbr9dRbegOYKNl5KkfPRN7digGZEz0fJpE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12233},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"22f207684c1cb9b895212eeb0a5519dc6d24b7b5","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/zod"},"_npmVersion":"11.16.0","description":"Derive CaretCMS Studio schemas from your Zod content-collection schemas — single source of truth.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","typescript":"6.0.3","@types/node":"25.6.0"},"peerDependencies":{"zod":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/zod_0.3.0_1787228426181_0.7254686562913131","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@caretcms/zod","version":"0.4.0","keywords":["astro","cms","caret","zod","json-schema","content-collections"],"license":"MIT","_id":"@caretcms/zod@0.4.0","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/zod#readme","bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"dist":{"shasum":"ba9fa84ff0927b0530d22bd213d740c088d4a87b","tarball":"https://registry.npmjs.org/@caretcms/zod/-/zod-0.4.0.tgz","fileCount":7,"integrity":"sha512-60/zb0NCTYvqy6yRJTPhWlussVYap0xkPI3yOsosY+Vp5aQvnqoE2oWqW+JMXBbV3E+xCjmDyhRL9oPwIo86Cg==","signatures":[{"sig":"MEQCIF9vJ7CsbDakcu3AxsBEvy0qVuLY6Uu+EvcHlKYE8reDAiBGPnE3sg76GoD+/ZgqZQ7u/3nuuf5jB3jxJzijTCI+5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12233},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1974191daab1f4eb2aec475a22fcb671d279b525","scripts":{"build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"repository":{"url":"git+https://github.com/web-stacked/caretcms.git","type":"git","directory":"packages/zod"},"_npmVersion":"11.16.0","description":"Derive CaretCMS Studio schemas from your Zod content-collection schemas — single source of truth.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"4.4.3","typescript":"6.0.3","@types/node":"25.6.0"},"peerDependencies":{"zod":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/zod_0.4.0_1789323416467_0.1165928273551915","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@caretcms/zod","version":"0.5.0","type":"module","description":"Derive CaretCMS Studio schemas from your Zod content-collection schemas — single source of truth.","license":"MIT","keywords":["astro","cms","caret","zod","json-schema","content-collections"],"homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/zod#readme","repository":{"type":"git","url":"git+https://github.com/web-stacked/caretcms.git","directory":"packages/zod"},"bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"node scripts/check-version.mjs && npm run clean && npm run build"},"publishConfig":{"access":"public"},"peerDependencies":{"zod":"^4.0.0"},"devDependencies":{"@types/node":"25.6.0","typescript":"6.0.3","zod":"4.4.3"},"gitHead":"1191d9f19f96d3aec856412b1a0799ff3d9ff357","_id":"@caretcms/zod@0.5.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-T0fx62QVhGs2wYbvDXbeqFiyyiLBKV5CNEZFcBon/dvHxYDFmAkPutAYEtHGsjtc3y3qjH04q6Mi3DcxaXHI6g==","shasum":"bc4bf194d1bdb8a814e720332ff8f24b15ca3328","tarball":"https://registry.npmjs.org/@caretcms/zod/-/zod-0.5.0.tgz","fileCount":7,"unpackedSize":12233,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGV17rfB1Jrt8OGt8/7lHjP/v/OE2ibjENUBmGRGIcf4AiEAidmWNbjsrf+bAULMHuUyYMhX34FYqlrXABA17P6lGK0="}]},"_npmUser":{"name":"techstacked","email":"allens56@gmail.com"},"directories":{},"maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/zod_0.5.0_1789347443459_0.9082474683001929"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-12T02:12:18.327Z","modified":"2026-09-14T00:57:23.805Z","0.1.0":"2026-06-12T02:12:18.734Z","0.2.0":"2026-08-04T16:02:48.649Z","0.3.0":"2026-08-20T12:20:26.343Z","0.4.0":"2026-09-13T18:16:56.584Z","0.5.0":"2026-09-14T00:57:23.632Z"},"bugs":{"url":"https://github.com/web-stacked/caretcms/issues"},"license":"MIT","homepage":"https://github.com/web-stacked/caretcms/tree/main/packages/zod#readme","keywords":["astro","cms","caret","zod","json-schema","content-collections"],"repository":{"type":"git","url":"git+https://github.com/web-stacked/caretcms.git","directory":"packages/zod"},"description":"Derive CaretCMS Studio schemas from your Zod content-collection schemas — single source of truth.","maintainers":[{"name":"techstacked","email":"allens56@gmail.com"}],"readme":"# @caretcms/zod\n\nDerive [CaretCMS](https://github.com/web-stacked/caretcms) Studio schemas from the Zod schemas you already have.\n\nCaretCMS's Studio consumes plain JSON Schema, and `@caretcms/core` stays deliberately Zod-agnostic (zero runtime deps). If you already describe a content collection with Zod — e.g. in Astro's `content.config.ts` — this helper turns that one source into the JSON-Schema map you hand to `caret({ schemas })`, so field definitions, labels, and widget hints live in a single place.\n\n```sh\nnpm install @caretcms/zod zod\n```\n\n```js\n// astro.config.mjs\nimport caret from '@caretcms/core';\nimport { schemasFromZod } from '@caretcms/zod';\nimport { blogSchema, pageSchema } from './src/schemas.mjs';\n\nexport default defineConfig({\n  integrations: [\n    caret({ schemas: schemasFromZod({ blog: blogSchema, page: pageSchema }) }),\n  ],\n});\n```\n\nWhat the conversion does beyond `z.toJSONSchema`:\n\n- **Dates** (`z.date()` / `z.coerce.date()`) become `{ type: \"string\", format: \"date\" }` so the Studio renders a date widget.\n- **`description` → `title`**: Zod `.describe(\"Headline\")` becomes the field's Studio label (an explicit `title` wins; `description` is kept).\n- **`override` hook** for per-node tweaks: `schemaFromZod(schema, { override: ({ jsonSchema }) => { … } })`.\n\nAPI: `schemaFromZod(zodObjectSchema, options?)` for one collection, `schemasFromZod({ name: schema, … }, options?)` for the whole map.\n\nRequires Zod v4 (peer dependency, uses `z.toJSONSchema`). Nothing here is imported by `@caretcms/core` — its Zod-agnostic boundary stays intact.\n\nMIT © CaretCMS contributors\n","readmeFilename":"README.md"}