{"_id":"scenv-zod","_rev":"8-ff88fc273cb69b40eafdf8b3f3971f19","name":"scenv-zod","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"scenv-zod","version":"0.1.0","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.1.0","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/senv#readme","bugs":{"url":"https://github.com/PKWadsy/senv/issues"},"dist":{"shasum":"964a49a06539578136a55a047655fdf16fae96b2","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.1.0.tgz","fileCount":5,"integrity":"sha512-F6Qx+5vhbUjhWHWMlyi68eMRi2Oe+50ooUtTtmC0i36x5mMmnzU405cogdwpkPCpzkfurNl2LxsRYz9FoI5DvQ==","signatures":[{"sig":"MEQCIBtyQhK5yE3M+BYR8tyyXlEk8zCmXXMe9BWs5kmiPVACAiBPW9yWLuZJEScvU64ovRH6QJ79t0oUoCmEOl/wQn+DJg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3163},"main":"dist/index.cjs","type":"module","_from":"file:scenv-zod-0.1.0.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"pkwadsy","email":"pkwads2@gmail.com"},"_resolved":"/tmp/5d1e2ceee36bcd57763157b17abdf2db/scenv-zod-0.1.0.tgz","_integrity":"sha512-F6Qx+5vhbUjhWHWMlyi68eMRi2Oe+50ooUtTtmC0i36x5mMmnzU405cogdwpkPCpzkfurNl2LxsRYz9FoI5DvQ==","repository":{"url":"git+https://github.com/PKWadsy/senv.git","type":"git"},"_npmVersion":"11.5.1","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"0.1.0","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.1.0_1771282477127_0.14545192076334001","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"scenv-zod","version":"0.1.1","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.1.1","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/senv#readme","bugs":{"url":"https://github.com/PKWadsy/senv/issues"},"dist":{"shasum":"655eaada644d53504612401a48afc5e55a5ae3ec","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.1.1.tgz","fileCount":5,"integrity":"sha512-ZPe2UitwVyCm3mc1wyG7zFD1HKFiRMH1RLKmjTLiiOfl395uzCgWceljTY4bKJUN2taMYP5pb4utfCCE0mSxPg==","signatures":[{"sig":"MEUCIQC5TtcfY0Exhd0At6RIhFlZ6S8b8eAWwi/+WYpksYPdGQIgE0u+lRnJcrKzaoRzV8jIhLBvbBnzCWyouw5B5coTfc0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3163},"main":"dist/index.cjs","type":"module","_from":"file:scenv-zod-0.1.1.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"pkwadsy","email":"pkwads2@gmail.com"},"_resolved":"/tmp/25f84037f8c6bd73cf0b5b5e34f5abdb/scenv-zod-0.1.1.tgz","_integrity":"sha512-ZPe2UitwVyCm3mc1wyG7zFD1HKFiRMH1RLKmjTLiiOfl395uzCgWceljTY4bKJUN2taMYP5pb4utfCCE0mSxPg==","repository":{"url":"git+https://github.com/PKWadsy/senv.git","type":"git"},"_npmVersion":"11.5.1","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"0.1.1","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.1.1_1771284772516_0.6796734129738893","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"scenv-zod","version":"0.2.0","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.2.0","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/senv#readme","bugs":{"url":"https://github.com/PKWadsy/senv/issues"},"dist":{"shasum":"3203bd704a6540373b11fbdef6b139a5633f2021","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.2.0.tgz","fileCount":5,"integrity":"sha512-tAJwni9pvbGazuS0hm1g7oqqcPQK00AaSXYZi0jv1VgIwXfMeE1JOjpvCBTJzRvwiiCYblA6Wvx+KijNZQBvBg==","signatures":[{"sig":"MEYCIQCfnz7BoEqR24PpLGCaC0IQ+t5BNueS3RGD2AEGXWhltgIhANBHvwC6qYE+NEH+wNTtiGT+REorTOp0FIyNkyaaX1y1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3165},"main":"dist/index.cjs","type":"module","_from":"file:scenv-zod-0.2.0.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"pkwadsy","email":"pkwads2@gmail.com"},"_resolved":"/tmp/86d9321b31772215b4dd5e29d0b6d59a/scenv-zod-0.2.0.tgz","_integrity":"sha512-tAJwni9pvbGazuS0hm1g7oqqcPQK00AaSXYZi0jv1VgIwXfMeE1JOjpvCBTJzRvwiiCYblA6Wvx+KijNZQBvBg==","repository":{"url":"git+https://github.com/PKWadsy/senv.git","type":"git"},"_npmVersion":"11.5.1","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"0.2.0","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.2.0_1771285424517_0.5490847246471755","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"scenv-zod","version":"0.2.1","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.2.1","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/senv#readme","bugs":{"url":"https://github.com/PKWadsy/senv/issues"},"dist":{"shasum":"14d75900bcad0dab3d662ad80f6801ed0c7acbd1","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.2.1.tgz","fileCount":5,"integrity":"sha512-AVpf+onbkDRO9Ev4yS6g2Uv2hH6EkELttcMjIgGyD5EIDno/xlHZGGPm73kA1KT7OAS/VWP8ewmyDwgRidUIvw==","signatures":[{"sig":"MEUCIQDHuFx5dYukaMnQVDqQILtI2syCk3yP4LcRo5+paQGkLQIgaEwqAKp9WF0L/8/osZ+J/oBe64PMXFNXU7FLtECC0zE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3165},"main":"dist/index.cjs","type":"module","_from":"file:scenv-zod-0.2.1.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"pkwadsy","email":"pkwads2@gmail.com"},"_resolved":"/tmp/8900f2ad4fc79f0b9ccba9f0036f49ab/scenv-zod-0.2.1.tgz","_integrity":"sha512-AVpf+onbkDRO9Ev4yS6g2Uv2hH6EkELttcMjIgGyD5EIDno/xlHZGGPm73kA1KT7OAS/VWP8ewmyDwgRidUIvw==","repository":{"url":"git+https://github.com/PKWadsy/senv.git","type":"git"},"_npmVersion":"11.5.1","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"0.2.1","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.2.1_1771291738537_0.9525326412520319","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"scenv-zod","version":"0.3.0","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.3.0","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/senv#readme","bugs":{"url":"https://github.com/PKWadsy/senv/issues"},"dist":{"shasum":"cd95cee60d6d859426de0dd2ced5c4ac03720d86","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.3.0.tgz","fileCount":5,"integrity":"sha512-A7u6etjexHgwqYNNRmlB0Q4Vfsma1ipCauAtniPsP/nwcgUztRuowG+HWvLV2p8d58aclcYnO1UenXUdDfI+Iw==","signatures":[{"sig":"MEUCIFdPKowNrc7Z641V6fiU8HUjQKNk1RMn8xKpo9Sd8fO7AiEA0suaWJqOzTw6Em4XO7fJp7Y0WhjU7kCsMaF0a3tuVNw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3165},"main":"dist/index.cjs","type":"module","_from":"file:scenv-zod-0.3.0.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"pkwadsy","email":"pkwads2@gmail.com"},"_resolved":"/tmp/4235fc2d55627a99b08d7fad4d114109/scenv-zod-0.3.0.tgz","_integrity":"sha512-A7u6etjexHgwqYNNRmlB0Q4Vfsma1ipCauAtniPsP/nwcgUztRuowG+HWvLV2p8d58aclcYnO1UenXUdDfI+Iw==","repository":{"url":"git+https://github.com/PKWadsy/senv.git","type":"git"},"_npmVersion":"11.5.1","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"0.3.0","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.3.0_1771295006621_0.48585742820715305","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"scenv-zod","version":"0.3.2","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.3.2","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/scenv#readme","bugs":{"url":"https://github.com/PKWadsy/scenv/issues"},"dist":{"shasum":"8bae7f4d6613bf865828118b518733dd38669cd7","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.3.2.tgz","fileCount":6,"integrity":"sha512-xBGnOd0qLX2dBuZmDBTVb0ozmKnytJsTY00HvCw66hLTOBgXaj9uaZKfG301QwmhzkZcgN0w1eicsatwMqXMOQ==","signatures":[{"sig":"MEYCIQD80k5VMZWoacFFvNMELjGPsktaziPT0xoS5OzczLlC6wIhALWUusGFno19Tueot/vbuFpkD3DAxTkuknnJO4m7/R2U","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/scenv-zod@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4620},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"8cd62a2e8c032f88a862f3480b7462888a2aecd6","scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fca4747a-85dd-40a0-9a03-bd0109795a19"}},"repository":{"url":"git+https://github.com/PKWadsy/scenv.git","type":"git"},"_npmVersion":"11.6.2","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"workspace:*","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.3.2_1771300357561_0.6004424290140862","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"scenv-zod","version":"0.3.3","keywords":["scenv","zod","validation"],"_id":"scenv-zod@0.3.3","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"homepage":"https://github.com/PKWadsy/scenv#readme","bugs":{"url":"https://github.com/PKWadsy/scenv/issues"},"dist":{"shasum":"af564a5b044f5a617bdd4e46888c93c3945b94e8","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.3.3.tgz","fileCount":6,"integrity":"sha512-K7wsR8CdA4t5dCStupLjOXQmp8+4c6sx3VaVNxWnyOcYIn2O9zALqzqegLieNtDgjBzI+6inQBOoaz49F1KDiQ==","signatures":[{"sig":"MEQCIHZiDy0V1bAEYF95jkuJ1z1skW1zfMQH/KIhDPG7HSPMAiAp5uFK3opZMIwLGadQJ+EBw9ueYVr0Iq+jm6u8/180kA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/scenv-zod@0.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5918},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"5de3f1b11f5a5f6e7264326a7bbea3d4984487a2","scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fca4747a-85dd-40a0-9a03-bd0109795a19"}},"repository":{"url":"git+https://github.com/PKWadsy/scenv.git","type":"git"},"_npmVersion":"11.6.2","description":"Zod validator for scenv variables","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.22.0","tsup":"^8.0.0","scenv":"workspace:*","typescript":"^5.3.0"},"peerDependencies":{"zod":"^3.22.0","scenv":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/scenv-zod_0.3.3_1771325818746_0.36131253961947873","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"scenv-zod","version":"0.4.0","description":"Zod parser for scenv variables","repository":{"type":"git","url":"git+https://github.com/PKWadsy/scenv.git"},"publishConfig":{"access":"public","provenance":true},"keywords":["scenv","zod","validation"],"type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean"},"peerDependencies":{"scenv":"workspace:*","zod":"^3.22.0"},"devDependencies":{"scenv":"workspace:*","zod":"^3.22.0","tsup":"^8.0.0","typescript":"^5.3.0"},"gitHead":"2471aa5ead8358b9f20e2b07a482346f2af52912","_id":"scenv-zod@0.4.0","bugs":{"url":"https://github.com/PKWadsy/scenv/issues"},"homepage":"https://github.com/PKWadsy/scenv#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-ZaQhRvPGUT82hq2IfF5BHCDrC71g/5xUAYruvh92WhaCy6yuY7Zvoy6u5sXDMe0HDmvucBH3jq4AEk1cuWEAWA==","shasum":"df464551617ba35f3418f2cb36d53f0ac339ff39","tarball":"https://registry.npmjs.org/scenv-zod/-/scenv-zod-0.4.0.tgz","fileCount":6,"unpackedSize":5862,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/scenv-zod@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD4Ks+BYM1S0Dmn3W3014PTzYOsBSVUPmVSyMrAgE5kqAIgL88Q7FOHEcFm7VU57MwXjArp6bZCskZe3U9cPgezPdM="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fca4747a-85dd-40a0-9a03-bd0109795a19"}},"directories":{},"maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/scenv-zod_0.4.0_1773272238758_0.2823770886611652"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-16T22:54:37.024Z","modified":"2026-03-11T23:37:19.165Z","0.1.0":"2026-02-16T22:54:37.293Z","0.1.1":"2026-02-16T23:32:52.673Z","0.2.0":"2026-02-16T23:43:44.658Z","0.2.1":"2026-02-17T01:28:58.674Z","0.3.0":"2026-02-17T02:23:26.781Z","0.3.2":"2026-02-17T03:52:37.720Z","0.3.3":"2026-02-17T10:56:58.900Z","0.4.0":"2026-03-11T23:37:18.897Z"},"bugs":{"url":"https://github.com/PKWadsy/scenv/issues"},"homepage":"https://github.com/PKWadsy/scenv#readme","keywords":["scenv","zod","validation"],"repository":{"type":"git","url":"git+https://github.com/PKWadsy/scenv.git"},"description":"Zod parser for scenv variables","maintainers":[{"name":"pkwadsy","email":"pkwads2@gmail.com"}],"readme":"# scenv-zod\n\nZod-based parser for [scenv](https://www.npmjs.com/package/scenv). Use Zod schemas to parse variable values; input from env/context/CLI is string, so use `z.coerce.number()`, etc. Default and variable output type are the parsed type T.\n\n## Install\n\n```bash\npnpm add scenv scenv-zod zod\n# or\nnpm install scenv scenv-zod zod\n```\n\n**Peer dependencies:** `scenv`, `zod` (^3.22.0).\n\n## Usage\n\nPass `parser(schema)` as the `parser` option to `scenv()`. The schema can coerce strings to numbers, booleans, etc.\n\n```ts\nimport { scenv } from \"scenv\";\nimport { parser } from \"scenv-zod\";\nimport { z } from \"zod\";\n\nconst port = scenv(\"Port\", {\n  key: \"port\",\n  env: \"PORT\",\n  default: 3000,\n  parser: parser(z.coerce.number().min(1).max(65535)),\n});\n\nconst debug = scenv(\"Debug\", {\n  key: \"debug\",\n  default: false,\n  parser: parser(\n    z.union([z.boolean(), z.literal(\"true\"), z.literal(\"false\")])\n      .transform((v) => v === true || v === \"true\")\n  ),\n});\n\nconst portNum = await port.get();   // number\nconst isDebug = await debug.get();  // boolean\n```\n\nParsing runs during `.get()` / `.safeGet()`. On failure, `.get()` throws; `.safeGet()` returns `{ success: false, error }` with the Zod error.\n\n## API\n\n| Export | Description |\n|--------|-------------|\n| `parser(schema)` | Returns a function `(val: unknown) => { success: true, data } \\| { success: false, error }` compatible with scenv's `parser` option. |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}