{"_id":"@drzl/generator-nestjs","_rev":"4-36b57bee77e40d8883c96a06a38335bb","name":"@drzl/generator-nestjs","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.0":{"name":"@drzl/generator-nestjs","version":"0.1.0","keywords":["drizzle","drizzle-orm","nestjs","codegen","dto","pipe"],"license":"Apache-2.0","_id":"@drzl/generator-nestjs@0.1.0","maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"homepage":"https://github.com/use-drzl/drzl#readme","bugs":{"url":"https://github.com/use-drzl/drzl/issues"},"dist":{"shasum":"9392e61c92e2f2f46bc775cdf0203addb53cca2b","tarball":"https://registry.npmjs.org/@drzl/generator-nestjs/-/generator-nestjs-0.1.0.tgz","fileCount":6,"integrity":"sha512-HQIhHbyVwJTNSP4O3S8QlGOxoiW5Ln8NoBCyMjywkxKZyixkzKg6v+kOOIXsL9NnDB/8wUyuWw+CCG9YFX7YZQ==","signatures":[{"sig":"MEUCIQDviei70FkhQgReKDlh4PepUk7jb0/MALSTdqBbccJ46QIgcPDNpvh2zKsQ2F2VCEt9n+ENrovSM74rTt4KG7mj7Qk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55747},"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"},"gitHead":"0bc738c3ebdbed8d3dd91a26a192b988ebf71ce0","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":"git+https://github.com/use-drzl/drzl.git","type":"git","directory":"packages/generator-nestjs"},"_npmVersion":"10.9.4","description":"Generate NestJS DTO and entity classes from a Drizzle schema, plain classes carrying a static Standard Schema v1 validator plus an emitted pipe that runs it, with no decorators in the generated code.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@drzl/analyzer":"workspace:^","@drzl/validation-core":"workspace:^"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","rxjs":"^7.8.2","tsup":"^8.5.1","arktype":"^2.1.29","valibot":"^1.1.0","typescript":"^5.9.3","@nestjs/core":"^11.1.28","@nestjs/common":"^11.1.28","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.28"},"_npmOperationalInternal":{"tmp":"tmp/generator-nestjs_0.1.0_1786347787608_0.9887641101788993","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@drzl/generator-nestjs","version":"0.2.0","keywords":["drizzle","drizzle-orm","nestjs","codegen","dto","pipe"],"license":"Apache-2.0","_id":"@drzl/generator-nestjs@0.2.0","maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"dist":{"shasum":"2156afdec97162d247972cc447eda73cc0f0ee8d","tarball":"https://registry.npmjs.org/@drzl/generator-nestjs/-/generator-nestjs-0.2.0.tgz","fileCount":7,"integrity":"sha512-/gETw8t9m36WFp5cTa1yMc14uZi/Ski5UIYZ0p2Im3m/b6Kr6OX8BIsQakiqK0CPTwfPy9Pf/HoPZ2BG+mFftA==","signatures":[{"sig":"MEUCIQCFMzgaH4sBfuY5FjLvrY0r3VSepmvMfpDYiy1YX7MFVQIgJCG6FRZaIR0PO9YWegrXp4xmHN5U5RtU+1rv+iO4x5g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@drzl%2fgenerator-nestjs@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":67096},"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":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f086a9c-7859-472f-adeb-675e45584bf9"}},"repository":{"url":"https://github.com/use-drzl/drzl","type":"git","directory":"packages/generator-nestjs"},"description":"Generate NestJS DTO and entity classes from a Drizzle schema, plain classes carrying a static Standard Schema v1 validator plus an emitted pipe that runs it, with no decorators in the generated code.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@drzl/analyzer":"^1.21.0","@drzl/validation-core":"^3.22.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","rxjs":"^7.8.2","tsup":"^8.5.1","arktype":"^2.1.29","valibot":"^1.1.0","typescript":"^5.9.3","@nestjs/core":"^11.1.28","@nestjs/common":"^11.1.28","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.28"},"_npmOperationalInternal":{"tmp":"tmp/generator-nestjs_0.2.0_1786351578115_0.9432327225016917","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@drzl/generator-nestjs","version":"0.2.1","keywords":["drizzle","drizzle-orm","nestjs","codegen","dto","pipe"],"license":"Apache-2.0","_id":"@drzl/generator-nestjs@0.2.1","maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"dist":{"shasum":"97e7709813e9a5266cc4ff888fc0595de2657f45","tarball":"https://registry.npmjs.org/@drzl/generator-nestjs/-/generator-nestjs-0.2.1.tgz","fileCount":7,"integrity":"sha512-SF/uCgh/mFzc4kc6Y/QW1BBXwqpKzVQfDxfNV1Za2SbRGxaGmbOF0ONnSNAQIvaJlB27ppHP5QpzBx+CHouoGA==","signatures":[{"sig":"MEUCIDl/nd45m7EtY1dEvr68XBKtKGByYmVCPtSdQvj0dHF1AiEAxanKLNb4oVA5sagaOWjRinDIgN23OoIK6s57gweTioo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@drzl%2fgenerator-nestjs@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":68776},"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":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f086a9c-7859-472f-adeb-675e45584bf9"}},"repository":{"url":"https://github.com/use-drzl/drzl","type":"git","directory":"packages/generator-nestjs"},"description":"Generate NestJS DTO and entity classes from a Drizzle schema, plain classes carrying a static Standard Schema v1 validator plus an emitted pipe that runs it, with no decorators in the generated code.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@drzl/analyzer":"^1.21.1","@drzl/validation-core":"^3.22.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.4.3","rxjs":"^7.8.2","tsup":"^8.5.1","arktype":"^2.1.29","valibot":"^1.1.0","typescript":"^5.9.3","@nestjs/core":"^11.1.28","@nestjs/common":"^11.1.28","reflect-metadata":"^0.2.2","@nestjs/platform-express":"^11.1.28"},"_npmOperationalInternal":{"tmp":"tmp/generator-nestjs_0.2.1_1786379780555_0.545944409347557","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@drzl/generator-nestjs","version":"0.2.3","private":false,"license":"Apache-2.0","description":"Generate NestJS DTO and entity classes from a Drizzle schema, plain classes carrying a static Standard Schema v1 validator plus an emitted pipe that runs it, with no decorators in the generated code.","keywords":["drizzle","drizzle-orm","nestjs","codegen","dto","pipe"],"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.21.5","@drzl/validation-core":"^3.22.6"},"devDependencies":{"@nestjs/common":"^11.1.28","@nestjs/core":"^11.1.28","@nestjs/platform-express":"^11.1.28","arktype":"^2.1.29","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","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-nestjs"},"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-nestjs@0.2.3","dist":{"integrity":"sha512-tca8ARcZPFPZKQuOAD+jyG+6k09NIX4sLy+3WdEcdbLeZPwbsjoVY65jXo2C0cTLK8YhwagZVH1p9wsXOTVBcA==","shasum":"c78731602199936313443dd94b93c36ccbf5a3e6","tarball":"https://registry.npmjs.org/@drzl/generator-nestjs/-/generator-nestjs-0.2.3.tgz","fileCount":7,"unpackedSize":72095,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@drzl%2fgenerator-nestjs@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDtB+l2mndBWfxEbwxb1TwVrsiWPHqM5X/QF+Tn9AV5HAIhALPWNanhs2eIlDEyk19fmo0nw6X70JzqrUl6QjMCHdbF"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f086a9c-7859-472f-adeb-675e45584bf9"}},"directories":{},"maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/generator-nestjs_0.2.3_1786427456459_0.31279619013922266"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-10T07:43:07.464Z","modified":"2026-08-11T05:50:56.956Z","0.1.0":"2026-08-10T07:43:07.751Z","0.2.0":"2026-08-10T08:46:18.253Z","0.2.1":"2026-08-10T16:36:20.709Z","0.2.3":"2026-08-11T05:50:56.591Z"},"license":"Apache-2.0","keywords":["drizzle","drizzle-orm","nestjs","codegen","dto","pipe"],"repository":{"type":"git","url":"https://github.com/use-drzl/drzl","directory":"packages/generator-nestjs"},"description":"Generate NestJS DTO and entity classes from a Drizzle schema, plain classes carrying a static Standard Schema v1 validator plus an emitted pipe that runs it, with no decorators in the generated code.","maintainers":[{"name":"omar-dulaimi","email":"o.m.dulaimi@gmail.com"}],"readme":"# @drzl/generator-nestjs\n\nGenerate [NestJS](https://nestjs.com) DTO and entity classes from a Drizzle schema: per table,\nthe insert, update, select and params shapes as plain classes whose fields state the parsed\nresult and whose `static schema` carries a Standard Schema v1 validator, plus a small emitted\n`SchemaValidationPipe` that runs it. The controllers stay yours.\n\n## Why plain classes, not class-validator decorators\n\nSettled from the registry and from measurement rather than taste. `@nestjs/common` lists\nclass-validator and class-transformer as optional peers, and class-transformer, the half that\nwould convert wire values, last published in 2021. Measured on class-validator 0.15.1: what a\ndecorator DTO accepts depends on the consumer's pipe options rather than the DTO\n(`enableImplicitConversion` reads `\"\"` as 0, `\"0x10\"` as 16 and `\"1e5\"` as 100000, the exact\nfamily DRZL's route generators refuse); `@IsOptional()` cannot tell `{ bio: null }` from `{}`;\nbigint has no story at all; and `@Type(() => Date)` accepts `\"1\"` as the year 2001. A static\nschema carries its policy with it, and no pipe option can loosen it.\n\nThe plain classes also compile under every tsconfig: no `experimentalDecorators` needed in the\ngenerated files (class-validator decorators fail TS1240 without it, measured). Your app keeps\nits standard Nest flags; the generated code does not require them.\n\n## Install\n\n```bash\nnpm install -D @drzl/generator-nestjs\n```\n\nThe generated code imports `@nestjs/common` (which a Nest app has by definition) and the\nvalidation library you chose: zod by default, valibot or arktype via `validation.library`.\n\n## Configure\n\n```ts\nimport { defineConfig } from '@drzl/cli/config';\n\nexport default defineConfig({\n  schema: 'src/db/schema.ts',\n  outDir: 'src/dto',\n  generators: [{ kind: 'nestjs', path: 'src/dto' }],\n});\n```\n\n## Consume\n\n```ts\nimport { Body, Controller, Param, Patch, Post } from '@nestjs/common';\nimport { CreateUsersDto, UpdateUsersDto, UsersParamsDto } from './dto/index.js';\n\n@Controller('users')\nexport class UsersController {\n  @Post()\n  create(@Body() body: CreateUsersDto) {\n    // body is the parsed output: undeclared keys stripped, wire forms transformed.\n  }\n\n  @Patch(':id')\n  update(@Param() params: UsersParamsDto, @Body() body: UpdateUsersDto) {\n    // params.id is a real number, parsed by the strict segment schema.\n  }\n}\n```\n\n```ts\nimport { SchemaValidationPipe } from './dto/index.js';\n\napp.useGlobalPipes(new SchemaValidationPipe());\n```\n\n## The shape of the DTOs\n\n- `Create<T>Dto` is the insert shape: generated columns absent, and a column the database can\n  fill in optional. That means a defaulted column, and also a nullable one, because an `INSERT`\n  that omits a nullable column stores `NULL` (measured against a real Postgres).\n- `Update<T>Dto` is all-optional with the primary key columns excluded, so an `id` in a PATCH\n  body is an undeclared key and is stripped.\n- `<T>ParamsDto` parses key segments strictly: `^-?\\d+(\\.\\d+)?$` into a number, digits kept as\n  a string for bigint, strict ISO datetime into a Date, the member set for an enum. The\n  `Number('')` family (`\"\"`, `\" \"`, `\"0x10\"`, `\"1e5\"`) is refused; Nest's own ParseIntPipe is\n  nearly as strict but silently rounds `\"9007199254740993\"` (measured).\n- `<T>Entity` is one row at its select shape. Date columns are `Date`; bigint columns stay\n  digit strings on both sides, because `JSON.stringify` throws on a real bigint.\n- Every class pairs with its schema through a typed static, so schema-vs-field drift is a\n  compile error inside the generated file. The pipe validates any class carrying one and passes\n  everything else through untouched.\n\n## Docs\n\nhttps://use-drzl.github.io/drzl/generators/nestjs\n\n## License\n\nApache-2.0\n","readmeFilename":""}