{"_id":"@drzl/generator-h3","_rev":"2-9d1037245729633c68e44851791e2dc0","name":"@drzl/generator-h3","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@drzl/generator-h3","version":"0.1.0","keywords":["drizzle","drizzle-orm","h3","nitro","nuxt","codegen","standard-schema"],"license":"Apache-2.0","_id":"@drzl/generator-h3@0.1.0","maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"dist":{"shasum":"2c66fd3a97e5d0bdee9611d487d7585db3a81476","tarball":"https://registry.npmjs.org/@drzl/generator-h3/-/generator-h3-0.1.0.tgz","fileCount":7,"integrity":"sha512-6MAa5anFccgf7Agt/e5hUnYxiavoY5QtDUetCnUVjug/X4G35KC2da+7alH9xs168ucvIujjc6fuBhjnRx35Ig==","signatures":[{"sig":"MEYCIQD9LRj99AKl5SVOmvgZJZ3Kklh6Z+bctXbO7VtVRn9v8QIhAIwaAFBhycEAqmEDvSG2NI0IMDLkZWxgqBxJ+nrN7sOm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55725},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.17.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"funding":{"url":"https://github.com/sponsors/omar-dulaimi","type":"github"},"private":false,"scripts":{"lint":"eslint . --ext .ts","test":"vitest run --testTimeout=20000","build":"tsup src/index.ts --dts --format esm,cjs --external prettier --clean"},"_npmUser":{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"},"repository":{"url":"https://github.com/use-drzl/drzl","type":"git","directory":"packages/generator-h3"},"description":"Generate h3 and Nitro route handlers from a Drizzle schema, one module per table, validated by DRZL's own schemas through h3's validation helpers on both major versions.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@drzl/analyzer":"^1.21.5","@drzl/validation-core":"^3.22.6"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"h3":"^1.15.11","zod":"^4.4.3","tsup":"^8.5.1","h3-v2":"npm:h3@^2.0.1-rc.26","arktype":"^2.1.29","valibot":"^1.1.0","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/generator-h3_0.1.0_1786499481263_0.3182380300807419","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@drzl/generator-h3","version":"0.1.1","private":false,"license":"Apache-2.0","description":"Generate h3 and Nitro route handlers from a Drizzle schema, one module per table, validated by DRZL's own schemas through h3's validation helpers on both major versions.","keywords":["drizzle","drizzle-orm","h3","nitro","nuxt","codegen","standard-schema"],"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,"dependencies":{"@drzl/analyzer":"^1.22.0","@drzl/validation-core":"^3.23.0"},"devDependencies":{"arktype":"^2.1.29","h3":"^1.15.11","h3-v2":"npm:h3@^2.0.1-rc.26","tsup":"^8.5.1","typescript":"^5.9.3","valibot":"^1.1.0","zod":"^4.4.3"},"engines":{"node":">=18.17.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"repository":{"type":"git","url":"https://github.com/use-drzl/drzl","directory":"packages/generator-h3"},"funding":{"type":"github","url":"https://github.com/sponsors/omar-dulaimi"},"scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --external prettier --clean","lint":"eslint . --ext .ts","test":"vitest run --testTimeout=20000"},"_nodeVersion":"24.18.0","_id":"@drzl/generator-h3@0.1.1","dist":{"integrity":"sha512-pgvR7v0X+lrwQzidSkF+iVxOvYalJjjcCYN+ZI+bWDCNRaL819LXw5zBrrsAC4YWfIEOZajblmwey12fWHY7DQ==","shasum":"976622a5933fa13667e331080790aeea08ab03c4","tarball":"https://registry.npmjs.org/@drzl/generator-h3/-/generator-h3-0.1.1.tgz","fileCount":7,"unpackedSize":55740,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@drzl%2fgenerator-h3@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFJ9JIJKO5OQy2cMTh3VBs9sK5mx20IkhOEy0lMp+DfDAiADoPHlkO1zj3R0phoQlhPppiG3XNF8fAWmY3wJalLvcQ=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3559d128-e571-49ed-a5fb-391907caf58b"}},"directories":{},"maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/generator-h3_0.1.1_1786697004461_0.8621696237442813"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-12T01:51:21.054Z","modified":"2026-08-14T08:43:24.977Z","0.1.0":"2026-08-12T01:51:21.406Z","0.1.1":"2026-08-14T08:43:24.598Z"},"license":"Apache-2.0","keywords":["drizzle","drizzle-orm","h3","nitro","nuxt","codegen","standard-schema"],"repository":{"type":"git","url":"https://github.com/use-drzl/drzl","directory":"packages/generator-h3"},"description":"Generate h3 and Nitro route handlers from a Drizzle schema, one module per table, validated by DRZL's own schemas through h3's validation helpers on both major versions.","maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"readme":"# @drzl/generator-h3\n\nGenerate [h3](https://h3.dev) route handlers from a Drizzle schema, for [Nitro](https://nitro.build)\nand [Nuxt](https://nuxt.com): one module per table, every payload validated through h3's own\nvalidation helpers.\n\n## The version split\n\nEstablished from the registry on 2026-08-11: `nitropack` 2.13.4 depends on `h3: ^1.15.11`, while\nh3's own `latest` tag is `2.0.1-rc.26`, a release candidate. So `npm install h3` gets a version no\nreleased Nitro uses, and every real Nuxt application is on v1. **`h3: 'v1'` is the default.**\n\nThe two differ in a way that reaches the emitted code. v2 takes a Standard Schema directly. v1 takes\na `ValidateFunction<T>`, which is `(data: unknown) => T | true | false | void`, with no Standard\nSchema overload at all: h3's own documentation suggests passing `objectSchema.safeParse`, a\nzod-shaped idiom valibot and arktype do not have. So a v1 module carries a small adapter and a v2\nmodule carries none.\n\nOne line of that adapter is load-bearing: the failure test is `result.issues` and **not**\n`'value' in result`, because valibot's failure result carries a `value` key alongside its issues and\nthe second form would report every valibot failure as a success. The Vercel AI SDK makes exactly\nthat mistake, which is why `@drzl/generator-ai` ships a workaround for it.\n\n## Install\n\n```bash\nnpm install -D @drzl/generator-h3\n```\n\n```ts\n// drzl.config.ts\nexport default {\n  schema: './src/db/schema.ts',\n  generators: [\n    { kind: 'zod', path: 'src/validators/zod' },\n    { kind: 'h3', path: 'server/generated' },\n  ],\n};\n```\n\nSet `h3: 'v2'` when your project is on the 2.x line.\n\n## What it emits\n\n`GET /users`, `GET /users/:id`, `POST /users`, `PATCH /users/:id` and `DELETE /users/:id` per table.\nA numeric path segment is converted rather than declared, because a segment is always a string and\n`z.number()` against `\"1\"` refuses every request.\n\nThe barrel is a route table rather than a mounted app: Nitro discovers handlers by file path, Nuxt\nby a different one, and a bare h3 project mounts them by hand, so any single choice would be wrong\nfor the other two.\n\nFull documentation: https://use-drzl.github.io/drzl/generators/h3\n\n## Licence\n\nApache-2.0. Generated output is yours under your own project's licence.\n","readmeFilename":""}