{"id":24121326,"url":"https://github.com/adeyahya/prisma-typebox-generator","last_synced_at":"2025-07-12T23:32:03.458Z","repository":{"id":39662150,"uuid":"373967199","full_name":"adeyahya/prisma-typebox-generator","owner":"adeyahya","description":"typebox ( typescript static type \u0026 json schema ) generator for Prisma 2","archived":false,"fork":false,"pushed_at":"2024-05-21T03:28:35.000Z","size":173,"stargazers_count":29,"open_issues_count":3,"forks_count":27,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-31T05:07:43.556Z","etag":null,"topics":["ajv","json-validator","prisma","prisma-generator","schema","static-typing","typebox"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adeyahya.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-04T21:54:40.000Z","updated_at":"2024-12-06T23:36:23.000Z","dependencies_parsed_at":"2024-05-21T04:48:49.584Z","dependency_job_id":null,"html_url":"https://github.com/adeyahya/prisma-typebox-generator","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":"0.44999999999999996","last_synced_commit":"0e2dde107b7c91182046d00253845cc0ef8189d3"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeyahya%2Fprisma-typebox-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeyahya%2Fprisma-typebox-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeyahya%2Fprisma-typebox-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adeyahya%2Fprisma-typebox-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adeyahya","download_url":"https://codeload.github.com/adeyahya/prisma-typebox-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233422979,"owners_count":18674087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajv","json-validator","prisma","prisma-generator","schema","static-typing","typebox"],"created_at":"2025-01-11T10:51:53.963Z","updated_at":"2025-01-11T10:51:56.985Z","avatar_url":"https://github.com/adeyahya.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Actions Status](https://github.com/adeyahya/prisma-typebox-generator/workflows/build/badge.svg)](https://github.com/adeyahya/prisma-typebox-generator/actions)\n[![npm](https://img.shields.io/npm/v/prisma-typebox-generator)](https://www.npmjs.com/package/prisma-typebox-generator)\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/adeyahya/prisma-typebox-generator/blob/master/LICENSE)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/)\n\n# Prisma Typebox Generator (Unmaintained)\nPlease use [prismabox](https://github.com/m1212e/prismabox) instead\n\nA generator, which takes a Prisma 2 `schema.prisma` and generates a typebox snippets.\n\n## Getting Started\n\n**1. Install**\n\nnpm:\n\n```shell\nnpm install prisma-typebox-generator --save-dev\n```\n\nyarn:\n\n```shell\nyarn add -D prisma-typebox-generator\n```\n\n**2. Add the generator to the schema**\n\n```prisma\ngenerator typebox {\n  provider = \"prisma-typebox-generator\"\n}\n```\n\nWith a custom output path (default=./typebox)\n\n```prisma\ngenerator typebox {\n  provider = \"prisma-typebox-generator\"\n  output = \"custom-output-path\"\n}\n```\n\n**3. Run generation**\n\nprisma:\n\n```shell\nprisma generate\n```\n\nnexus with prisma plugin:\n\n```shell\nnexus build\n```\n\n## Supported Node Versions\n\n|         Node Version | Support            |\n| -------------------: | :----------------- |\n| (Maintenance LTS) 10 | :heavy_check_mark: |\n|      (Active LTS) 12 | :heavy_check_mark: |\n|         (Current) 14 | :heavy_check_mark: |\n\n## Examples\n\nThis generator converts a prisma schema like this:\n\n```prisma\ndatasource db {\n\tprovider = \"postgresql\"\n\turl      = env(\"DATABASE_URL\")\n}\n\nmodel User {\n    id          Int      @id @default(autoincrement())\n    createdAt   DateTime @default(now())\n    email       String   @unique\n    weight      Float?\n    is18        Boolean?\n    name        String?\n    successorId Int?\n    successor   User?    @relation(\"BlogOwnerHistory\", fields: [successorId], references: [id])\n    predecessor User?    @relation(\"BlogOwnerHistory\")\n    role        Role     @default(USER)\n    posts       Post[]\n    keywords    String[]\n    biography   Json\n}\n\nmodel Post {\n    id     Int   @id @default(autoincrement())\n    user   User? @relation(fields: [userId], references: [id])\n    userId Int?\n}\n\nenum Role {\n    USER\n    ADMIN\n}\n```\n\n## License: MIT\n\nCopyright (c) 2022 Ade Yahya Prasetyo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadeyahya%2Fprisma-typebox-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadeyahya%2Fprisma-typebox-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadeyahya%2Fprisma-typebox-generator/lists"}